mirror of
https://github.com/YunoHost/package_check.git
synced 2024-09-03 20:06:20 +02:00
Check YEP 1.7
This commit is contained in:
parent
f6aba4a9f6
commit
adf55c2636
2 changed files with 15 additions and 3 deletions
|
@ -606,12 +606,24 @@ TEST_RESULTS () {
|
||||||
# -> The package can be backup and restore without error
|
# -> The package can be backup and restore without error
|
||||||
if level_can_change 6
|
if level_can_change 6
|
||||||
then
|
then
|
||||||
|
# Check the YEP 1.7 (https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-17---ajouter-lapp-%C3%A0-lorganisation-yunohost-apps---valid%C3%A9--manuel--official-)
|
||||||
|
# Default value, YEP 1.7 not checked
|
||||||
|
YEP17=-1
|
||||||
|
if echo "$app_arg" | grep --extended-regexp --quiet "https?:\/\/"
|
||||||
|
then
|
||||||
|
# If the app have been picked from github, check if this app was under the YunoHost-Apps organisation
|
||||||
|
# YEP17 will be equal to 1 if the app was under the YunoHost-Apps organisation
|
||||||
|
YEP17=$(echo "$app_arg" | grep --count "github.com/YunoHost-Apps/")
|
||||||
|
[ $YEP17 -eq 1 ] || ECHO_FORMAT "This app doesn't respect the YEP 1.7 ! (https://yunohost.org/#/packaging_apps_guidelines_fr)\n" "red"
|
||||||
|
fi
|
||||||
|
|
||||||
# Validated if backup and restore are ok. Or if backup and restore have been not tested but already validated before.
|
# Validated if backup and restore are ok. Or if backup and restore have been not tested but already validated before.
|
||||||
if ( [ $RESULT_check_backup -eq 1 ] && \
|
if ( [ $RESULT_check_backup -eq 1 ] && \
|
||||||
[ $RESULT_check_restore -eq 1 ] ) || \
|
[ $RESULT_check_restore -eq 1 ] ) || \
|
||||||
( [ $RESULT_check_backup -ne -1 ] && \
|
( [ $RESULT_check_backup -ne -1 ] && \
|
||||||
[ $RESULT_check_restore -ne -1 ] && \
|
[ $RESULT_check_restore -ne -1 ] && \
|
||||||
[ "${level[6]}" == "2" ] )
|
[ "${level[6]}" == "2" ] ) && \
|
||||||
|
[ $YEP17 -ne 0 ]
|
||||||
then level[6]=2
|
then level[6]=2
|
||||||
else level[6]=0
|
else level[6]=0
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -40,10 +40,10 @@ LXC_START () {
|
||||||
# Start the container and log the booting process in $script_dir/lxc_boot.log
|
# Start the container and log the booting process in $script_dir/lxc_boot.log
|
||||||
# Try to start only if the container is not already started
|
# Try to start only if the container is not already started
|
||||||
if ! is_lxc_running; then
|
if ! is_lxc_running; then
|
||||||
echo "Start the LXC container" | tee --append "$test_result"
|
echo -n "Start the LXC container" | tee --append "$test_result"
|
||||||
sudo lxc-start --name=$lxc_name --daemon --logfile "$script_dir/lxc_boot.log" | tee --append "$test_result" 2>&1
|
sudo lxc-start --name=$lxc_name --daemon --logfile "$script_dir/lxc_boot.log" | tee --append "$test_result" 2>&1
|
||||||
else
|
else
|
||||||
echo "A LXC container is already running" | tee --append "$test_result"
|
echo -n "A LXC container is already running" | tee --append "$test_result"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check during 20 seconds if the container has finished to start.
|
# Check during 20 seconds if the container has finished to start.
|
||||||
|
|
Loading…
Add table
Reference in a new issue