The Free Software Media System - Server Backend & API
Support trying local branches in submodule
Joshua Bonifacecf85e2327ed8
diff --git a/build b/buildindex b922cf72a9..5c081af6e5 100755--- a/build+++ b/build@@ -171,10 +171,20 @@ if ! git diff-index --quiet HEAD --; thenfigit fetch --all-git checkout origin/${web_branch} || {- echo "ERROR: 'jellyfin-web' branch ${web_branch} is invalid."- exit 1-}+# If this is an official branch name, fetch it from origin+official_branches_regex="^master$|^dev$|^release-.*$|^hotfix-.*$"+if [[ ${web_branch} =~ ${official_branches_regex} ]]; then+ git checkout origin/${web_branch} || {+ echo "ERROR: 'jellyfin-web' branch 'origin/${web_branch}' is invalid."+ exit 1+ }+# Otherwise, just check out the local branch (for testing, etc.)+else+ git checkout ${web_branch} || {+ echo "ERROR: 'jellyfin-web' branch '${web_branch}' is invalid."+ exit 1+ }+fipopd# Execute each platform and action in order, if said action is enableddiff --git a/bump_version b/bump_versionindex 0db6c18ad6..c3f1a78d50 100755--- a/bump_version+++ b/bump_version@@ -47,10 +47,20 @@ if ! git diff-index --quiet HEAD --; thenfigit fetch --all-git checkout origin/${web_branch} || {- echo "ERROR: 'jellyfin-web' branch ${web_branch} is invalid."- exit 1-}+# If this is an official branch name, fetch it from origin+official_branches_regex="^master$|^dev$|^release-.*$|^hotfix-.*$"+if [[ ${web_branch} =~ ${official_branches_regex} ]]; then+ git checkout origin/${web_branch} || {+ echo "ERROR: 'jellyfin-web' branch 'origin/${web_branch}' is invalid."+ exit 1+ }+# Otherwise, just check out the local branch (for testing, etc.)+else+ git checkout ${web_branch} || {+ echo "ERROR: 'jellyfin-web' branch '${web_branch}' is invalid."+ exit 1+ }+fipopdnew_version="$1"