diff options
| author | rejbasket <39080670+rejbasket@users.noreply.github.com> | 2025-04-13 21:53:06 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-13 21:53:06 +0200 |
| commit | 91ffe0ceca53091d4de0e9bbbca0560998bb7967 (patch) | |
| tree | be4810a622c9e7f0d27658059c9c847dc17a1233 /bin/build-windows-installer | |
| parent | 6681593cb2db39b6ab35d5b44066212e9d68b979 (diff) | |
moved mkdir artifacts to build-python (#3667)
check to build artifacts folder for signed or local build
Co-authored-by: rejbasket <rejbasket@users.noreply.github.com>
Diffstat (limited to 'bin/build-windows-installer')
| -rwxr-xr-x | bin/build-windows-installer | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/bin/build-windows-installer b/bin/build-windows-installer index 85780079..99f84137 100755 --- a/bin/build-windows-installer +++ b/bin/build-windows-installer @@ -2,6 +2,20 @@ VERSION="${VERSION:-$(echo ${GITHUB_REF} | sed -e 's|refs/heads/||' -e 's|refs/tags/||' -e 's|/|-|g')}" OS="${BUILD:-$(uname)}" ARCH=$(python -c "import platform; n = platform.architecture()[0]; print(n)") +# Check for signed directory +if [[ -d "signed-artifacts" ]]; then + DIRECTORY="signed-artifacts" + echo "Found signed artifacts" +else + if [[ ! -d "signed-artifacts" ]] && [[ ! -z "${GITHUB_REF}" ]]; then + mkdir signed-artifacts + DIRECTORY="signed-artifacts" + echo "Created signed artifacts" + else + DIRECTORY="artifacts" + echo "No signed artifacts found, local build" + fi +fi # Create windows installer mkdir win cp installer_scripts/template.iss win/win_build.iss @@ -14,21 +28,10 @@ sed -i'' -e '/;inkstitch-version/ a\'$'\n'"${version_block}"'' win/win_build.iss sed -i'' -e '/;arch-allowed/ a\'$'\n'"ArchitecturesAllowed=x64 arm64"'' win/win_build.iss iscc win/win_build.iss -mv win/inkstitch.exe artifacts/inkstitch-${VERSION}-${OS}-${ARCH}.exe +mv win/inkstitch.exe ${DIRECTORY}/inkstitch-${VERSION}-${OS}-${ARCH}.exe cd dist echo "Creating zip" -if [[ -d "../signed-artifacts" ]]; then - DIRECTORY="signed-artifacts" - echo "Found signed artifacts" -else - if [[ ! -d "../signed-artifacts" ]]; then - DIRECTORY="signed-artifacts" - echo "Created signed artifacts" - else - DIRECTORY="artifacts" - echo "No signed artifacts found, local build" - fi -fi + # The python zipfile command line utility can't handle directories # containing files with UTF-8 names on Windows, so we use 7-zip instead. |
