Skip to content

Commit 225c11a

Browse files
committed
open-pr: support updating InnoSetup
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 <[email protected]>
1 parent 33c3153 commit 225c11a

File tree

3 files changed

+26
-2
lines changed

3 files changed

+26
-2
lines changed

.github/workflows/open-pr.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ jobs:
3535
mingw-w64-git-lfs|mingw-w64-git-sizer|mingw-w64-wintoast|\
3636
git-extra|git-for-windows-keyring) repo=build-extra;;
3737
mingw-w64-*) repo=MINGW-packages;;
38+
innosetup)
39+
repo=build-extra &&
40+
echo "package_path=installer" >>$GITHUB_ENV &&
41+
echo "skip-deployment-check=true" >>$GITHUB_OUTPUT
42+
;;
3843
*) repo=MSYS2-packages;;
3944
esac &&
4045
echo "REPO=$repo" >>$GITHUB_ENV &&
@@ -109,7 +114,7 @@ jobs:
109114
id: update
110115
shell: bash
111116
run: |
112-
cd "/usr/src/$REPO/$PACKAGE_TO_UPGRADE" &&
117+
cd "/usr/src/$REPO/${package_path-$PACKAGE_TO_UPGRADE}" &&
113118
update_script="$GITHUB_WORKSPACE/update-scripts/version/$PACKAGE_TO_UPGRADE"
114119
if test -f "$update_script"
115120
then
@@ -140,6 +145,7 @@ jobs:
140145
echo "msg=$msg" >>$GITHUB_OUTPUT &&
141146
echo "modified=true" >>$GITHUB_OUTPUT
142147
- name: check if the package was already deployed
148+
if: steps.repo.outputs.skip-deployment-check != 'true'
143149
shell: bash
144150
run: |
145151
./update-scripts/ensure-not-yet-deployed.sh "/usr/src/$REPO/$PACKAGE_TO_UPGRADE"
@@ -149,7 +155,7 @@ jobs:
149155
run: |
150156
auth="$(printf '%s:%s' '${{ steps.actor.outputs.login }}' '${{ steps.setup.outputs.token }}' | base64)" &&
151157
echo "::add-mask::$auth" &&
152-
cd "/usr/src/$REPO/$PACKAGE_TO_UPGRADE" &&
158+
cd "/usr/src/$REPO/${package_path-$PACKAGE_TO_UPGRADE}" &&
153159
git -c http.extraHeader="Authorization: Basic $auth" push --force origin HEAD:refs/heads/$PACKAGE_TO_UPGRADE-$UPGRADE_TO_VERSION
154160
- name: open PR
155161
if: steps.update.outputs.modified == 'true'

update-scripts/checksums/innosetup

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
3+
echo "::notice::No checksum update needed for Inno Setup" >&2

update-scripts/version/innosetup

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/sh
2+
3+
set -x &&
4+
url="https://files.jrsoftware.org/download.php/innosetup-$1.exe" &&
5+
curl -# -LR -D curl.log -o is.exe "$url" &&
6+
cat curl.log &&
7+
case "$(head -n 1 curl.log)" in
8+
HTTP/*" 200"*) ;; # okay
9+
*) false;;
10+
esac &&
11+
./is.exe //verysilent //dir=InnoSetup //noicons //tasks= //portable=1 //lang=english \
12+
//SP- //SUPPRESSMSGBOXES //NORESTART //LOG=is.log &&
13+
cat is.log &&
14+
git add -A InnoSetup/ &&
15+
git status

0 commit comments

Comments
 (0)