mirror of
https://github.com/YunoHost/package_check.git
synced 2024-09-03 20:06:20 +02:00
Merge pull request #84 from YunoHost/check-master-exists
Check that master branch does indeed exists or fallback to stable
This commit is contained in:
commit
2d283066e5
1 changed files with 12 additions and 1 deletions
|
@ -514,7 +514,18 @@ then
|
||||||
# Force the branch master if no branch is specified.
|
# Force the branch master if no branch is specified.
|
||||||
if [ -z "$gitbranch" ]
|
if [ -z "$gitbranch" ]
|
||||||
then
|
then
|
||||||
gitbranch="-b master"
|
if git ls-remote --quiet --exit-code $app_arg master
|
||||||
|
then
|
||||||
|
gitbranch="-b master"
|
||||||
|
else
|
||||||
|
if git ls-remote --quiet --exit-code $app_arg stable
|
||||||
|
then
|
||||||
|
gitbranch="-b stable"
|
||||||
|
else
|
||||||
|
ECHO_FORMAT "Unable to find a default branch to test (master or stable)" "red"
|
||||||
|
clean_exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
# Clone the repository
|
# Clone the repository
|
||||||
git clone $app_arg $gitbranch "$package_path"
|
git clone $app_arg $gitbranch "$package_path"
|
||||||
|
|
Loading…
Add table
Reference in a new issue