1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/gitlab_ynh.git synced 2024-09-03 18:36:35 +02:00

Fix package_linter

This commit is contained in:
Kayou 2019-02-09 22:18:57 +01:00
parent 0ec62e059f
commit 13b46e0069
No known key found for this signature in database
GPG key ID: 823A2CBE071D3126
4 changed files with 20 additions and 19 deletions

View file

@ -2,10 +2,10 @@
"name": "Gitlab", "name": "Gitlab",
"id": "gitlab", "id": "gitlab",
"packaging_format": 1, "packaging_format": 1,
"version": "11.7.5~ynh2", "version": "11.7.5~ynh3",
"description": { "description": {
"en": "Gitlab for Yunohost.", "en": "GitLab is a Git-repository manager.",
"fr": "Gitlab pour YunoHost." "fr": "GitLab est un gestionnaire de dépôts Git."
}, },
"url": "https://gitlab.com", "url": "https://gitlab.com",
"license": "MIT", "license": "MIT",

View file

@ -119,7 +119,7 @@ setup_source() {
ynh_print_info "Installing Gitlab..." ynh_print_info "Installing Gitlab..."
#Fix for the CI #Fix for the CI
if sudo grep -qa container=lxc /proc/1/environ; then if grep -qa container=lxc /proc/1/environ; then
dpkg -i $src_filename || true # This command will fail in lxc env dpkg -i $src_filename || true # This command will fail in lxc env
sed -i 's/command \"cat \/etc\/sysctl.conf \/etc\/sysctl.d\/\*.conf | sysctl -e -p -\"/command \"cat \/etc\/sysctl.conf\"/g' $final_path/embedded/cookbooks/package/resources/sysctl.rb sed -i 's/command \"cat \/etc\/sysctl.conf \/etc\/sysctl.d\/\*.conf | sysctl -e -p -\"/command \"cat \/etc\/sysctl.conf\"/g' $final_path/embedded/cookbooks/package/resources/sysctl.rb
dpkg --configure gitlab-ce || true dpkg --configure gitlab-ce || true

View file

@ -74,8 +74,8 @@ nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf
if [ $change_path -eq 1 ]; then if [ $change_path -eq 1 ]; then
ynh_print_info "Changing path..." ynh_print_info "Changing path..."
sudo gitlab-ctl stop unicorn gitlab-ctl stop unicorn
sudo gitlab-ctl stop sidekiq gitlab-ctl stop sidekiq
# Make a backup of the original nginx config file if modified # Make a backup of the original nginx config file if modified
ynh_backup_if_checksum_is_different "$nginx_conf_path" ynh_backup_if_checksum_is_different "$nginx_conf_path"
@ -103,11 +103,11 @@ fi
config_gitlab config_gitlab
sudo gitlab-ctl reconfigure gitlab-ctl reconfigure
if [ $change_path -eq 1 ]; then if [ $change_path -eq 1 ]; then
sudo gitlab-ctl restart gitlab-ctl restart
sudo gitlab-ctl restart unicorn gitlab-ctl restart unicorn
fi fi
#================================================= #=================================================

View file

@ -9,6 +9,17 @@
# Source YunoHost helpers # Source YunoHost helpers
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
#=================================================
# MANAGE SCRIPT FAILURE
#=================================================
ynh_clean_setup() {
rm /var/opt/gitlab/backups/*_gitlab_backup.tar
true
}
# Exit if an error occurs during the execution of the script # Exit if an error occurs during the execution of the script
ynh_abort_if_errors ynh_abort_if_errors
@ -25,16 +36,6 @@ fi
# Load common variables and helpers # Load common variables and helpers
source _common.sh source _common.sh
#=================================================
# MANAGE SCRIPT FAILURE
#=================================================
ynh_clean_setup() {
rm /var/opt/gitlab/backups/*_gitlab_backup.tar
true
}
#================================================= #=================================================
# LOAD SETTINGS # LOAD SETTINGS
#================================================= #=================================================