summaryrefslogtreecommitdiff
path: root/bin/build-windows-installer
blob: 44c297424c373f95e382a7c41fc67232a0539991 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash
VERSION="$(echo ${GITHUB_REF} | sed -e 's|refs/heads/||' -e 's|refs/tags/||' -e 's|/|-|g')"
OS="${BUILD:-$(uname)}"
# Create windows installer
mkdir win
cp installer_scripts/template.iss win/win_build.iss
# adds the year and version to the inno installer
info_year=$( date "+%Y" )
copyright_year="#define COPYRIGHT \""${info_year}"\" + URL"
version_block="#define VERSION \""${VERSION}"\""
sed -i'' -e '/;inkstitch-year/ a\'$'\n'"${copyright_year}"'' win/win_build.iss
sed -i'' -e '/;inkstitch-version/ a\'$'\n'"${version_block}"'' win/win_build.iss

iscc win/win_build.iss
mv  win/inkstitch.exe artifacts/inkstitch-${VERSION}-${OS}.exe