mirror of
https://github.com/YunoHost/package_check.git
synced 2024-09-03 20:06:20 +02:00
Handle GitHub url with a branch
This commit is contained in:
parent
a865689c84
commit
d00cd37f5d
3 changed files with 17 additions and 0 deletions
|
@ -184,6 +184,7 @@ Le script `package_check.sh` accepte 6 arguments en plus du package à tester.
|
|||
- `--bash-mode`: Rend le script autonome. Aucune intervention de l'utilisateur ne sera nécessaire.
|
||||
La valeur de auto_remove est ignorée.
|
||||
- `--branch=nom-de-branche`: Teste une branche du dépôt plutôt que de tester master. Permet de tester les pull request.
|
||||
Vous pouvez utiliser une url avec une branche, https://github.com/YunoHost-Apps/APP_ynh/tree/my_branch, pour utiliser implicitement cet argument.
|
||||
- `--build-lxc`: Installe LXC et créer le conteneur debian Yunohost si nécessaire.
|
||||
- `--force-install-ok`: Force la réussite des installations, même si elles échouent. Permet d'effectuer les tests qui suivent même si l'installation a échouée.
|
||||
- `--interrupt`: Force l'option auto_remove à 0, le script marquera une pause avant chaque suppression d'application.
|
||||
|
|
|
@ -184,6 +184,7 @@ The `package_check.sh` script accept 6 arguments in addition of the package to b
|
|||
- `--bash-mode`: The script will work without user intervention.
|
||||
auto_remove value is ignored
|
||||
- `--branch=branch-name`: Check a branch of the repository instead of master. Allow to check a pull request.
|
||||
You can use an url with a branch, https://github.com/YunoHost-Apps/APP_ynh/tree/my_branch, to implicitly use this argument.
|
||||
- `--build-lxc`: Install LXC and create the Debian YunoHost container if necessary.
|
||||
- `--force-install-ok`: Force success of installations, even if they fail. Allow to perform following tests even if an installation fails.
|
||||
- `--interrupt`: Force auto_remove value, break before each remove.
|
||||
|
|
|
@ -490,6 +490,21 @@ fi
|
|||
|
||||
echo "Pick up the package which will be tested."
|
||||
|
||||
# If the url is on a specific branch, extract the branch
|
||||
if echo "$app_arg" | grep --quiet --extended-regexp "https?:\/\/.*\/tree\/"
|
||||
then
|
||||
gitbranch="-b ${app_arg##*/tree/}"
|
||||
app_arg="${app_arg%%/tree/*}"
|
||||
fi
|
||||
|
||||
ECHO_FORMAT "Test the package $app_arg" "blue" "bold"
|
||||
if [ -n "$gitbranch" ]
|
||||
then
|
||||
ECHO_FORMAT " on the branch ${gitbranch##-b }.\n" "blue" "bold"
|
||||
else
|
||||
ECHO_FORMAT ".\n" "blue" "bold"
|
||||
fi
|
||||
|
||||
# Remove the previous package if it's still here.
|
||||
rm -rf "$script_dir"/*_check
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue