leejunyoung5819wayland-android-remote

공개

Ubuntu(Wayland/X11)에서 Android 기기 화면 미러링 및 원격 제어 (Rust)

41줄1.6 KB
1#!/usr/bin/env bash
2# 릴리스 첨부 파일을 dist/에 모은다: 배포판별 .deb, APK, 소스 아카이브(GPL 소스 제공), SHA256SUMS.
3#
4# ./scripts/release.sh .deb는 scripts/build-deb.sh로 미리 만들어 둔다
5# SKIP_APK=1 ./scripts/release.sh APK를 다시 빌드하지 않는다
6set -euo pipefail
7cd "$(dirname "$0")/.."
8
9VERSION="$(sed -n 's/^version = "\(.*\)"/\1/p' Cargo.toml | head -n1)"
10APK_VERSION="$(sed -n 's/.*versionName = "\(.*\)"/\1/p' android/app/build.gradle.kts | head -n1)"
11if [[ "$VERSION" != "$APK_VERSION" ]]; then
12 echo "버전 불일치: Cargo.toml $VERSION, APK $APK_VERSION" >&2
13 exit 1
14fi
15if [[ -n "$(git status --porcelain)" ]]; then
16 echo "커밋하지 않은 변경이 있습니다. 소스 아카이브가 실제 빌드와 달라질 수 있습니다." >&2
17 exit 1
18fi
19
20mkdir -p dist
21for v in 26.04 24.04; do
22 deb="dist/android-remote_${VERSION}-1~ubuntu${v}_amd64.deb"
23 [[ -f "$deb" ]] || { echo "없음: $deb (./scripts/build-deb.sh $v)" >&2; exit 1; }
24done
25
26if [[ -z "${SKIP_APK:-}" ]]; then
27 (cd android && ./gradlew -q assembleRelease)
28fi
29cp android/app/build/outputs/apk/release/app-release.apk "dist/android-remote-${VERSION}.apk"
30
31git archive --format=tar.gz --prefix="wayland-android-remote-${VERSION}/" \
32 -o "dist/wayland-android-remote-${VERSION}-source.tar.gz" HEAD
33
34(
35 cd dist
36 sha256sum "android-remote_${VERSION}-1~ubuntu26.04_amd64.deb" \
37 "android-remote_${VERSION}-1~ubuntu24.04_amd64.deb" \
38 "android-remote-${VERSION}.apk" \
39 "wayland-android-remote-${VERSION}-source.tar.gz" > SHA256SUMS
40 cat SHA256SUMS
41)