diff --git a/Rakefile b/Rakefile index 673ba52..3b1eaef 100644 --- a/Rakefile +++ b/Rakefile @@ -1,10 +1,13 @@ README = "readme.txt" -SRC = ["prg-bib.php", "resize-iframe.js", README] +PHP = "prg-bib.php" +SRC = [PHP, "resize-iframe.js", README] GIT_TAG = `git describe --tag --exact-match`.chomp README_TAG = /^Stable tag: *(.*) *$/.match(open(README).read)[1] +PHP_TAG = /\/*.*Version: *([^ ]*) *$/m.match(open(PHP).read)[1] ZIP = "prg-bib-#{README_TAG}.zip" -raise "tag mismatch: #{GIT_TAG}(git), #{README_TAG}(#{README})" \ - unless GIT_TAG == README_TAG +raise("tag mismatch: #{GIT_TAG}(git), #{README_TAG}(#{README}), "+ + "#{PHP_TAG}(#{PHP})") \ + unless GIT_TAG == README_TAG && README_TAG == "v"+PHP_TAG changes=`git status --porcelain --untracked-files=no`.chomp raise "there are changes: #{changes}" unless changes.empty? diff --git a/prg-bib.php b/prg-bib.php index c307ec4..6c51bac 100644 --- a/prg-bib.php +++ b/prg-bib.php @@ -3,7 +3,7 @@ * Plugin Name: PRG Bibliography Shortcode * Plugin URI: https://github.com/prg-titech/bib-shortcode/ * Description: Shortcode to embed publication lists. - * Version: 0.1.1-alpha + * Version: 0.1.4-alpha * Requires at least: 5.2 * Requires PHP: 7.2 * Author: Hidehiko Masuhara diff --git a/readme.txt b/readme.txt index 5d939a6..fe20520 100644 --- a/readme.txt +++ b/readme.txt @@ -3,7 +3,7 @@ Contributors: masuhara Tags: bibtex, bibliography, citation Requires at least: 5.2 Tested up to: 6.6.1 -Stable tag: v0.1.3-alpha +Stable tag: v0.1.4-alpha Requires PHP: 7.2 License: GPL v2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html @@ -22,7 +22,7 @@ Usage = How to update = 1. Decide the release name (e.g., v0.1.3-alpha) -2. Write the release name on Stable tag in readme.txt +2. Write the release name on Stable tag in readme.txt and prg-bib.php. 3. Add a Changelog section in readme.txt 4. Locally commit changes 5. Locally add a release tag (git tag v0.1.3-alpha) @@ -34,6 +34,9 @@ Usage == Changelog == +- v0.1.4-alpha + FIX: check release tag in .php + - v0.1.3-alpha FIX: .js and readme files are included.