Skip to content

Commit

Permalink
open-pr: support updating InnoSetup
Browse files Browse the repository at this point in the history
InnoSetup is not really _packaged_ in Git for Windows, but instead it
is committed as-is.

Also, the directory name where the changes need to be made does not
reflect the "package name".

That requires a couple of unusual changes to support ;-)

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
  • Loading branch information
dscho committed Jul 12, 2024
1 parent 33c3153 commit 7f3e969
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/open-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ jobs:
mingw-w64-git-lfs|mingw-w64-git-sizer|mingw-w64-wintoast|\
git-extra|git-for-windows-keyring) repo=build-extra;;
mingw-w64-*) repo=MINGW-packages;;
innosetup)
repo=build-extra &&
echo "package_path=installer" >>$GITHUB_ENV &&
echo "skip-deployment-check=true" >>$GITHUB_OUTPUT
;;
*) repo=MSYS2-packages;;
esac &&
echo "REPO=$repo" >>$GITHUB_ENV &&
Expand Down Expand Up @@ -109,7 +114,7 @@ jobs:
id: update
shell: bash
run: |
cd "/usr/src/$REPO/$PACKAGE_TO_UPGRADE" &&
cd "/usr/src/$REPO/${package_path-$PACKAGE_TO_UPGRADE}" &&
update_script="$GITHUB_WORKSPACE/update-scripts/version/$PACKAGE_TO_UPGRADE"
if test -f "$update_script"
then
Expand All @@ -135,11 +140,12 @@ jobs:
updpkgsums
fi &&
msg="$PACKAGE_TO_UPGRADE: update to $UPGRADE_TO_VERSION" &&
git add PKGBUILD &&
{ test ! -f PKGBUILD || git add PKGBUILD; } &&
git commit -sm "$msg" &&
echo "msg=$msg" >>$GITHUB_OUTPUT &&
echo "modified=true" >>$GITHUB_OUTPUT
- name: check if the package was already deployed
if: steps.repo.outputs.skip-deployment-check != 'true'
shell: bash
run: |
./update-scripts/ensure-not-yet-deployed.sh "/usr/src/$REPO/$PACKAGE_TO_UPGRADE"
Expand All @@ -149,7 +155,7 @@ jobs:
run: |
auth="$(printf '%s:%s' '${{ steps.actor.outputs.login }}' '${{ steps.setup.outputs.token }}' | base64)" &&
echo "::add-mask::$auth" &&
cd "/usr/src/$REPO/$PACKAGE_TO_UPGRADE" &&
cd "/usr/src/$REPO/${package_path-$PACKAGE_TO_UPGRADE}" &&
git -c http.extraHeader="Authorization: Basic $auth" push --force origin HEAD:refs/heads/$PACKAGE_TO_UPGRADE-$UPGRADE_TO_VERSION
- name: open PR
if: steps.update.outputs.modified == 'true'
Expand Down
3 changes: 3 additions & 0 deletions update-scripts/checksums/innosetup
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

echo "::notice::No checksum update needed for Inno Setup" >&2
12 changes: 12 additions & 0 deletions update-scripts/version/innosetup
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh

set -x &&
url="https://jrsoftware.org/download.php/innosetup-$1.exe" &&
curl -# -LR -D curl.log -o is.exe "$url" &&
cat curl.log &&
grep 'HTTP/.* 200' curl.log &&
./is.exe //verysilent //dir=InnoSetup //noicons //tasks= //portable=1 //lang=english \
//SP- //SUPPRESSMSGBOXES //NORESTART //LOG=is.log &&
cat is.log &&
git add -A InnoSetup/ &&
git status

0 comments on commit 7f3e969

Please sign in to comment.