Xbox Cloud Gaming app for PS5 Homebrew
C
feat(release): support --force to rebuild/repackage existing release
Rafael Abud Ferreira63fe4338b121
diff --git a/tools/release.sh b/tools/release.shindex 020337d..8ffae76 100755--- a/tools/release.sh+++ b/tools/release.sh@@ -38,8 +38,10 @@ shiftout=""console=0linux=0+force=0for a in "$@"; docase $a in+ --force) force=1 ;;--console) console=1 ;;--linux) linux=1 ;;*) out=$a ;;@@ -69,15 +71,19 @@ ok "clean tree on $(git rev-parse --abbrev-ref HEAD) at $(git rev-parse --shortgrep -q "project(xcloud_ps5 VERSION $version " CMakeLists.txt || fail "CMakeLists.txt is not at VERSION $version"grep -q "\"contentVersion\": \"$content\"" ps5/sce_sys/param.json || fail "param.json contentVersion is not $content"ok "version $version, contentVersion $content"-git rev-parse -q --verify "refs/tags/$tag" >/dev/null && fail "tag $tag exists already"-git ls-remote --exit-code --tags origin "$tag" >/dev/null 2>&1 && fail "tag $tag exists on origin already"-last=$(git describe --tags --abbrev=0 2>/dev/null || true)-if [[ -n $last ]]; then- prev=$(git show "$last:ps5/sce_sys/param.json" | grep -o '"contentVersion": "[^"]*"' | cut -d'"' -f4)- [[ $content > $prev ]] || fail "contentVersion $content is not above $last's $prev"- ok "above $last ($prev)"- if git diff "$last"..HEAD | grep -nE "^\+.*($tokens)"; then fail "a token in the changes since $last"; fi- ok "no token in the changes since $last"+if [[ $force -eq 0 ]]; then+ git rev-parse -q --verify "refs/tags/$tag" >/dev/null && fail "tag $tag exists already"+ git ls-remote --exit-code --tags origin "$tag" >/dev/null 2>&1 && fail "tag $tag exists on origin already"+ last=$(git describe --tags --abbrev=0 2>/dev/null || true)+ if [[ -n $last ]]; then+ prev=$(git show "$last:ps5/sce_sys/param.json" | grep -o '"contentVersion": "[^"]*"' | cut -d'"' -f4)+ [[ $content > $prev ]] || fail "contentVersion $content is not above $last's $prev"+ ok "above $last ($prev)"+ if git diff "$last"..HEAD | grep -nE "^\+.*($tokens)"; then fail "a token in the changes since $last"; fi+ ok "no token in the changes since $last"+ fi+else+ ok "force mode enabled: bypassing existing tag checks for $tag"fiif git ls-files | grep -nE "$private"; then fail "private files are tracked"; fiok "no private file tracked"