Skip to content

Commit

Permalink
Fixes for releases
Browse files Browse the repository at this point in the history
  • Loading branch information
Syer10 committed Mar 30, 2024
1 parent 1db6387 commit 4e4837c
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 23 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/Build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ jobs:
desktop/build/compose/binaries/main-release/*/
desktop/build/compose/jars/
!desktop/build/compose/binaries/main/app/
!desktop/build/compose/binaries/main-release/app/
${{ env.ANDROID_SIGNED_FILE }}
# Upload runner errors
Expand Down Expand Up @@ -154,6 +155,7 @@ jobs:
desktop/build/compose/binaries/main-release/*/
desktop/build/compose/jars/
!desktop/build/compose/binaries/main/app/
!desktop/build/compose/binaries/main-release/app/
# Upload runner errors
- name: Upload error logs
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/Preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ jobs:
desktop/build/compose/binaries/main-release/*/
desktop/build/compose/jars/
!desktop/build/compose/binaries/main/app/
!desktop/build/compose/binaries/main-release/app/
${{ env.ANDROID_SIGNED_FILE }}
# Upload runner errors
Expand Down Expand Up @@ -162,6 +163,7 @@ jobs:
desktop/build/compose/binaries/main-release/*/
desktop/build/compose/jars/
!desktop/build/compose/binaries/main/app/
!desktop/build/compose/binaries/main-release/app/
# Upload runner errors
- name: Upload error logs
Expand Down Expand Up @@ -197,11 +199,10 @@ jobs:

- name: Get previous release
id: last_release
uses: Dmagine/get-latest-release@master
uses: pozetroninc/github-action-get-latest-release@v0.7.0
with:
myToken: ${{ github.token }}
exclude_types: "draft|prerelease"
view_top: 1
token: ${{ github.token }}
exclude_types: "prerelease, draft"
owner: Suwayomi
repo: Suwayomi-JUI-preview

Expand All @@ -212,7 +213,7 @@ jobs:
echo "COMMIT_COUNT=$commit_count" >> $GITHUB_ENV
current_sha=$(git rev-parse --short HEAD)
echo "CURRENT_SHA=$current_sha" >> $GITHUB_ENV
prev_commit_count=$(echo "${{ steps.last_release.outputs.tag_name }}" | sed -e "s/^r//")
prev_commit_count=$(echo "${{ steps.last_release.outputs.release }}" | sed -e "s/^r//")
commit_count_diff=$(expr $commit_count - $prev_commit_count)
prev_release_sha=$(git rev-parse --short HEAD~$commit_count_diff)
echo "PREV_RELEASE_SHA=$prev_release_sha" >> $GITHUB_ENV
Expand Down
36 changes: 18 additions & 18 deletions scripts/NamingFix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,25 @@ if [ -f "$msi" ]; then
fi
fi

# Find DMG
dmg_dirs="$(find ./ -type d -iname '*-macos-*' 2>/dev/null)"
for dir in $dmg_dirs; do
arch=$(basename "$dir" | cut -d'-' -f3) # Extract architecture from directory name
dmg="$dir/*.dmg"
if [ "$(ls -A $dir/*.dmg 2>/dev/null)" ]; then
version=$(tmp=$(basename $dir/*.dmg .dmg) && echo "${tmp##*-}")

if [ "$arch" == "x64" ]; then
if [ "$(basename $dir/*.dmg)" != "$name-macos-x64-$version.dmg" ]; then
mv $dir/*.dmg "$dir/$name-macos-x64-$version.dmg"
fi
elif [ "$arch" == "arm64" ]; then
if [ "$(basename $dir/*.dmg)" != "$name-macos-arm64-$version.dmg" ]; then
mv $dir/*.dmg "$dir/$name-macos-arm64-$version.dmg"
fi
fi
dmg_x64="$(find ./runner-package-osx-x64/binaries/\(main-release\|main\)/dmg/ -iname '*.dmg' 2>/dev/null)"
if [ -f "$dmg_x64" ]; then
dir="$(dirname "$dmg_x64")"
version=$(tmp="${dmg_x64%.*}" && echo "${tmp##*-}")

if [ "$(basename "$dmg_x64")" != "$name-macos-x64-$version.dmg" ]; then
mv "$dmg_x64" "$dir/$name-macos-x64-$version.dmg"
fi
fi

dmg_arm64="$(find ./runner-package-osx-arm64/binaries/\(main-release\|main\)/dmg/ -iname '*.dmg' 2>/dev/null)"
if [ -f "$dmg_arm64" ]; then
dir="$(dirname "$dmg_arm64")"
version=$(tmp="${dmg_arm64%.*}" && echo "${tmp##*-}")

if [ "$(basename "$dmg_arm64")" != "$name-macos-m1-$version.dmg" ]; then
mv "$dmg_arm64" "$dir/$name-macos-m1-$version.dmg"
fi
done
fi

apk="$(find ./ -iname '*.apk' 2>/dev/null)"
if [ -f "$apk" ]; then
Expand Down

0 comments on commit 4e4837c

Please sign in to comment.