Skip to content

Commit

Permalink
Also make sure CHANGELOG version is up-to-date
Browse files Browse the repository at this point in the history
  • Loading branch information
qsniyg committed Oct 5, 2023
1 parent 7ad3dce commit 86f2b34
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tools/package_extension.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ get_userscript_version() {
USERVERSION=`get_userscript_version userscript.user.js`
MANIFESTVERSION=`cat manifest.json | grep '"version": *"[0-9.]*", *$' | sed 's/.*"version": *"\([0-9.]*\)", *$/\1/g'`
PACKAGEVERSION=`cat package.json | grep '"version": *"[0-9.]*", *$' | sed 's/.*"version": *"\([0-9.]*\)", *$/\1/g'`
CHANGELOGVERSION=`cat CHANGELOG.txt | head -n1`

if [ -z "$USERVERSION" -o -z "$MANIFESTVERSION" -o -z "$PACKAGEVERSION" ]; then
echo Broken version regex
Expand All @@ -32,6 +33,11 @@ if [ "$USERVERSION" != "$PACKAGEVERSION" ]; then
exit 1
fi

if [ "$USERVERSION" != "$CHANGELOGVERSION" ]; then
echo 'Conflicting versions (userscript and changelog)'
exit 1
fi

if [ ! -d "node_modules" ]; then
npm install
fi
Expand Down

0 comments on commit 86f2b34

Please sign in to comment.