Skip to content

Commit

Permalink
FIX: check release tag in .php
Browse files Browse the repository at this point in the history
  • Loading branch information
masuhar committed Sep 25, 2024
1 parent 1bc3780 commit 9d7260b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
9 changes: 6 additions & 3 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -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?

Expand Down
2 changes: 1 addition & 1 deletion prg-bib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 5 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand All @@ -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.

Expand Down

0 comments on commit 9d7260b

Please sign in to comment.