1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/digiscreen_ynh.git synced 2024-09-03 18:26:15 +02:00

Change googleYoutube to apikey_google_youtube, pixabay to apikey_pixabay

This commit is contained in:
Félix Piédallu 2023-10-03 16:06:31 +02:00
parent 9aeb75be3d
commit d32907a76b
4 changed files with 19 additions and 5 deletions

View file

@ -38,7 +38,7 @@ ram.runtime = "100M"
type = "path"
default = "/digiscreen"
[install.pixabay]
[install.apikey_pixabay]
ask.en = "Your Pixabay API key"
ask.fr = "Votre clé dAPI Pixabay"
help.en = "Optional: a Pixabay API key will let you chose a background by entering keywords."
@ -47,7 +47,7 @@ ram.runtime = "100M"
example = "123456abc"
optional = true
[install.googleYoutube]
[install.apikey_google_youtube]
ask.en = "Your Google API key"
ask.fr = "Votre clé dAPI Google"
help.en = "Optional: a Google API key will let you insert videos from Youtube on your Digiscreen"

View file

@ -12,8 +12,8 @@ nodejs_version="14"
_digiscreen_build() {
pushd "$install_dir/sources"
echo "VUE_APP_PIXABAY_API_KEY=$pixabay" >> .env
echo "VUE_APP_GOOGLE_API_KEY=$googleYoutube" >> .env
echo "VUE_APP_PIXABAY_API_KEY=$apikey_pixabay" >> .env
echo "VUE_APP_GOOGLE_API_KEY=$apikey_google_youtube" >> .env
ynh_use_nodejs
"$ynh_npm" install

View file

@ -22,6 +22,20 @@ upgrade_type=$(ynh_check_app_version_changed)
#=================================================
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
if [[ -n "${googleYoutube:-}" ]]; then
# migrate camelCase to snake_case
apikey_google_youtube="$googleYoutube"
ynh_app_setting_set --app="$app" --key="apikey_google_youtube" --value="$apikey_google_youtube"
ynh_app_setting_delete --app="$app" --key="googleYoutube"
fi
if [[ -n "${pixabay:-}" ]]; then
# migrate camelCase to snake_case
apikey_pixabay="$pixabay"
ynh_app_setting_set --app="$app" --key="apikey_pixabay" --value="$apikey_pixabay"
ynh_app_setting_delete --app="$app" --key="pixabay"
fi
#=================================================
# INSTALL NODEJS
#=================================================

View file

@ -5,6 +5,6 @@ test_format = 1.0
[default]
args.pixabay = "cafe1007"
args.googleYoutube = "1337c0c4"
args.google_youtube = "1337c0c4"
test_upgrade_from.3bb42cd71bcca77b7f642859bf5048317586a500.name = "First release"