-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Before this change, release.sh built some native stuff, and Makefile.CrossWindows built the Windows releases. Instead, use a single release.make to build the whole release. It also avoids to build the server one more time.
- Loading branch information
Showing
2 changed files
with
27 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,2 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
# test locally | ||
TESTDIR=build_test | ||
rm -rf "$TESTDIR" | ||
# run client tests with ASAN enabled | ||
meson "$TESTDIR" -Db_sanitize=address | ||
ninja -C"$TESTDIR" test | ||
|
||
# test server | ||
GRADLE=${GRADLE:-./gradlew} | ||
$GRADLE -p server check | ||
|
||
BUILDDIR=build_release | ||
rm -rf "$BUILDDIR" | ||
meson "$BUILDDIR" --buildtype release --strip -Db_lto=true | ||
cd "$BUILDDIR" | ||
ninja | ||
cd - | ||
|
||
# build Windows releases | ||
make -f Makefile.CrossWindows | ||
|
||
# the generated server must be the same everywhere | ||
cmp "$BUILDDIR/server/scrcpy-server" dist/scrcpy-win32/scrcpy-server | ||
cmp "$BUILDDIR/server/scrcpy-server" dist/scrcpy-win64/scrcpy-server | ||
|
||
# get version name | ||
TAG=$(git describe --tags --always) | ||
|
||
# create release directory | ||
mkdir -p "release-$TAG" | ||
cp "$BUILDDIR/server/scrcpy-server" "release-$TAG/scrcpy-server-$TAG" | ||
cp "dist/scrcpy-win32-$TAG.zip" "release-$TAG/" | ||
cp "dist/scrcpy-win64-$TAG.zip" "release-$TAG/" | ||
|
||
# generate checksums | ||
cd "release-$TAG" | ||
sha256sum "scrcpy-server-$TAG" \ | ||
"scrcpy-win32-$TAG.zip" \ | ||
"scrcpy-win64-$TAG.zip" > SHA256SUMS.txt | ||
|
||
echo "Release generated in release-$TAG/" | ||
make -f release.make |