Skip to content

Commit

Permalink
Add target name
Browse files Browse the repository at this point in the history
  • Loading branch information
rom1v committed Nov 25, 2024
1 parent e3342f4 commit 309538d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ jobs:
tar xf dist-tar/dist.tar.gz
- name: Package linux
run: release/package_client.sh linux tar.gz
run: release/package_client.sh linux linux-x86_64 tar.gz

- name: Upload linux release
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -274,7 +274,7 @@ jobs:
tar xf dist-tar/dist.tar.gz
- name: Package win32
run: release/package_client.sh win32 zip
run: release/package_client.sh win32 win32 zip

- name: Upload win32 release
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -310,7 +310,7 @@ jobs:
tar xf dist-tar/dist.tar.gz
- name: Package win64
run: release/package_client.sh win64 zip
run: release/package_client.sh win64 win64 zip

- name: Upload win64 release
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -346,7 +346,7 @@ jobs:
tar xf dist-tar/dist.tar.gz
- name: Package macos
run: release/package_client.sh macos tar.gz
run: release/package_client.sh macos macos-aarch64 tar.gz

- name: Upload macos release
uses: actions/upload-artifact@v4
Expand Down
9 changes: 5 additions & 4 deletions release/package_client.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ cd .. # root project dir

if [[ $# != 2 ]]
then
# <target_name>: for example win64
# <target>: linux, win32, win64 or macos
# <name>: target name for the archive (for example linux-x86_64)
# <format>: zip or tar.gz
echo "Syntax: $0 <target> <format>" >&2
echo "Syntax: $0 <target> <name> <format>" >&2
exit 1
fi

FORMAT=$2
FORMAT="$3"

if [[ "$FORMAT" != zip && "$FORMAT" != tar.gz ]]
then
Expand All @@ -22,7 +23,7 @@ fi

BUILD_DIR="$WORK_DIR/build-$1"
ARCHIVE_DIR="$BUILD_DIR/release-archive"
TARGET_DIRNAME="scrcpy-$1-$VERSION"
TARGET_DIRNAME="scrcpy-$2-$VERSION"

rm -rf "$ARCHIVE_DIR/$TARGET_DIRNAME"
mkdir -p "$ARCHIVE_DIR/$TARGET_DIRNAME"
Expand Down
6 changes: 3 additions & 3 deletions release/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ rm -rf output
./build_linux.sh

./package_server.sh
./package_client.sh win32 zip
./package_client.sh win64 zip
./package_client.sh linux tar.gz
./package_client.sh win32 win32 zip
./package_client.sh win64 win64 zip
./package_client.sh linux linux-x86_64 tar.gz

./generate_checksums.sh

Expand Down

0 comments on commit 309538d

Please sign in to comment.