diff options
| author | Joshua M. Boniface <joshua@boniface.me> | 2019-01-21 13:28:40 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-21 13:28:40 -0500 |
| commit | 571afa4fe2322796e172ce5b7214a18ff52696da (patch) | |
| tree | 8f5ffc29b3e0f6827bb76630acf5bcd02fdd0d7a /build | |
| parent | 42f2799d66578707dc30ceefcc39efddb4daeb99 (diff) | |
| parent | 384f867228cc38d6e9eeedc16f14af7345df220c (diff) | |
Merge pull request #655 from joshuaboniface/local-web-branch
Support trying local branches in submodule
Diffstat (limited to 'build')
| -rwxr-xr-x | build | 18 |
1 files changed, 14 insertions, 4 deletions
@@ -171,10 +171,20 @@ if ! git diff-index --quiet HEAD --; then fi git 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 + } +fi popd # Execute each platform and action in order, if said action is enabled |
