Improved release tooling.

This commit is contained in:
hackademix 2024-07-16 11:38:46 +02:00
parent 712d4b5163
commit 16230d79e8
No known key found for this signature in database
GPG Key ID: 231A83AFDA9C2434
2 changed files with 23 additions and 2 deletions

View File

@ -24,7 +24,7 @@ VER=$(grep '"version":' "$MANIFEST_IN" | sed -re 's/.*": "(.*?)".*/\1/')
if [ "$1" == "tag" ]; then
echo "Tagging at $VER"
git tag -a "$VER" -e -m"$(gitcl 2>/dev/null)"
git push origin "$VER"
git push && git push origin "$VER"
exit 0
fi
if [[ "$1" =~ ^r(el(ease)?)?$ ]]; then
@ -193,5 +193,9 @@ fi
mv "$BUILD" "$CHROMIUM_UNPACKED"
if [ "$SIGNED" ]; then
# ensure nscl is up-to-date git-wise
./nscl_gitsync.sh
"$0" tag
nscl
../../we-publish "$XPI.xpi"
fi
fi

17
nscl_gitsync.sh Normal file
View File

@ -0,0 +1,17 @@
#!/bin/bash
BASE="$(dirname "$0")"
NSCL_PATH="$BASE/src/nscl"
commit_range=$(git diff "$NSCL_PATH" | grep 'Subproject commit' | sed -r -e's/\+.* /../' -e's/.*commit //' | tr -d '\n')
if ! [[ $commit_range ]]; then
echo >&2 "nscl commits already in sync."
exit 1
fi
pushd "$NSCL_PATH"
git log --oneline "$commit_range"
if ! git push ; then
popd
exit 1
fi
popd
git commit -m'[nscl] Updated to latest NoScript Commons Library.' "$NSCL_PATH"