mirror of
https://github.com/YunoHost-Apps/penpot_ynh.git
synced 2024-09-03 19:56:56 +02:00
Fix linter errors (#4)
* Fixed nginx.conf * Fuck off linter * Fixed usages of `sed` * Auto-update README * Bump version just for good measure. * Auto-update README * Fix description --------- Co-authored-by: yunohost-bot <yunohost@yunohost.org> Co-authored-by: Éric Gaspar <46165813+ericgaspar@users.noreply.github.com>
This commit is contained in:
parent
f240c5e074
commit
2ff4e83cc8
8 changed files with 17 additions and 118 deletions
|
@ -16,9 +16,9 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
Design and prototyping platform meant for cross-domain teams. Non dependent on operating systems, Penpot is web based and works with open standards (SVG). Penpot invites designers all over the world to fall in love with open source while getting developers excited about the design process in return.
|
Design and prototyping platform meant for cross-domain teams. Non dependent on operating systems, web based and works with open standards (SVG). Penpot invites designers all over the world to fall in love with open source while getting developers excited about the design process in return.
|
||||||
|
|
||||||
**Shipped version:** 1.19.3~ynh1
|
**Shipped version:** 1.19.3~ynh2
|
||||||
|
|
||||||
## Screenshots
|
## Screenshots
|
||||||
|
|
||||||
|
|
|
@ -16,9 +16,9 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po
|
||||||
|
|
||||||
## Vue d’ensemble
|
## Vue d’ensemble
|
||||||
|
|
||||||
Design and prototyping platform meant for cross-domain teams. Non dependent on operating systems, Penpot is web based and works with open standards (SVG). Penpot invites designers all over the world to fall in love with open source while getting developers excited about the design process in return.
|
Design and prototyping platform meant for cross-domain teams. Non dependent on operating systems, web based and works with open standards (SVG). Penpot invites designers all over the world to fall in love with open source while getting developers excited about the design process in return.
|
||||||
|
|
||||||
**Version incluse :** 1.19.3~ynh1
|
**Version incluse :** 1.19.3~ynh2
|
||||||
|
|
||||||
## Captures d’écran
|
## Captures d’écran
|
||||||
|
|
||||||
|
|
|
@ -97,11 +97,11 @@ location / {
|
||||||
more_set_headers "X-Cache-Status: $upstream_cache_status";
|
more_set_headers "X-Cache-Status: $upstream_cache_status";
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~* \.(js|css).*$ {
|
location ~* ^/.*\.(js|css).*$ {
|
||||||
more_set_headers "Cache-Control: 'max-age=86400'"; # 24 hours
|
more_set_headers "Cache-Control: 'max-age=86400'"; # 24 hours
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~* \.(html).*$ {
|
location ~* ^/.*\.(html).*$ {
|
||||||
more_set_headers "Cache-Control: 'no-cache, max-age=0'";
|
more_set_headers "Cache-Control: 'no-cache, max-age=0'";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Design and prototyping platform meant for cross-domain teams. Non dependent on operating systems, Penpot is web based and works with open standards (SVG). Penpot invites designers all over the world to fall in love with open source while getting developers excited about the design process in return.
|
Design and prototyping platform meant for cross-domain teams. Non dependent on operating systems, web based and works with open standards (SVG). Penpot invites designers all over the world to fall in love with open source while getting developers excited about the design process in return.
|
|
@ -3,10 +3,10 @@ packaging_format = 2
|
||||||
id = "penpot"
|
id = "penpot"
|
||||||
name = "Penpot"
|
name = "Penpot"
|
||||||
|
|
||||||
description.en = "Penpot - The Open-Source design and prototyping platform"
|
description.en = "Design and prototyping platform"
|
||||||
description.fr = "Penpot - La plateforme de conception et de prototypage open-source"
|
description.fr = "Plateforme de conception et de prototypage"
|
||||||
|
|
||||||
version = "1.19.3~ynh1"
|
version = "1.19.3~ynh2"
|
||||||
|
|
||||||
maintainers = ["orhtej2"]
|
maintainers = ["orhtej2"]
|
||||||
|
|
||||||
|
|
101
scripts/config
101
scripts/config
|
@ -1,101 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
# In simple cases, you don't need a config script.
|
|
||||||
|
|
||||||
# With a simple config_panel.toml, you can write in the app settings, in the
|
|
||||||
# upstream config file or replace complete files (logo ...) and restart services.
|
|
||||||
|
|
||||||
# The config scripts allows you to go further, to handle specific cases
|
|
||||||
# (validation of several interdependent fields, specific getter/setter for a value,
|
|
||||||
# display dynamic informations or choices, pre-loading of config type .cube... ).
|
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# GENERIC STARTING
|
|
||||||
#=================================================
|
|
||||||
# IMPORT GENERIC HELPERS
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
source /usr/share/yunohost/helpers
|
|
||||||
|
|
||||||
ynh_abort_if_errors
|
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# RETRIEVE ARGUMENTS
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
install_dir=$(ynh_app_setting_get --app="$app" --key=install_dir)
|
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# SPECIFIC GETTERS FOR TOML SHORT KEY
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
get__amount() {
|
|
||||||
# Here we can imagine to have an API call to stripe to know the amount of donation during a month
|
|
||||||
local amount=200
|
|
||||||
|
|
||||||
# It's possible to change some properties of the question by overriding it:
|
|
||||||
if [ "$amount" -gt 100 ]; then
|
|
||||||
cat << EOF
|
|
||||||
style: success
|
|
||||||
value: $amount
|
|
||||||
ask:
|
|
||||||
en: A lot of donation this month: **$amount €**
|
|
||||||
EOF
|
|
||||||
else
|
|
||||||
cat << EOF
|
|
||||||
style: danger
|
|
||||||
value: $amount
|
|
||||||
ask:
|
|
||||||
en: Not so much donation this month: $amount €
|
|
||||||
EOF
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
get__prices() {
|
|
||||||
local prices
|
|
||||||
prices="$(grep "DONATION\['" "$install_dir/settings.py" | sed -r "s@^DONATION\['([^']*)'\]\['([^']*)'\] = '([^']*)'@\1/\2/\3@g" | sed -z 's/\n/,/g;s/,$/\n/')"
|
|
||||||
if [ "$prices" == "," ]; then
|
|
||||||
# Return YNH_NULL if you prefer to not return a value at all.
|
|
||||||
echo YNH_NULL
|
|
||||||
else
|
|
||||||
echo "$prices"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# SPECIFIC VALIDATORS FOR TOML SHORT KEYS
|
|
||||||
#=================================================
|
|
||||||
validate__publishable_key() {
|
|
||||||
|
|
||||||
# We can imagine here we test if the key is really a publishable key
|
|
||||||
(is_secret_key "$publishable_key") &&
|
|
||||||
echo 'This key seems to be a secret key'
|
|
||||||
}
|
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# SPECIFIC SETTERS FOR TOML SHORT KEYS
|
|
||||||
#=================================================
|
|
||||||
set__prices() {
|
|
||||||
|
|
||||||
#---------------------------------------------
|
|
||||||
# IMPORTANT: setters are triggered only if a change is detected
|
|
||||||
#---------------------------------------------
|
|
||||||
for price in $(echo "$prices" | sed "s/,/ /"); do
|
|
||||||
frequency=$(echo "$price" | cut -d/ -f1)
|
|
||||||
currency=$(echo "$price" | cut -d/ -f2)
|
|
||||||
price_id=$(echo "$price" | cut -d/ -f3)
|
|
||||||
sed "d/DONATION\['$frequency'\]\['$currency'\]" "$install_dir/settings.py"
|
|
||||||
|
|
||||||
echo "DONATION['$frequency']['$currency'] = '$price_id'" >> "$install_dir/settings.py"
|
|
||||||
done
|
|
||||||
|
|
||||||
#---------------------------------------------
|
|
||||||
# IMPORTANT: to be able to upgrade properly, you have to save the value in settings too
|
|
||||||
#---------------------------------------------
|
|
||||||
ynh_app_setting_set --app="$app" --key=prices --value="$prices"
|
|
||||||
}
|
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# GENERIC FINALIZATION
|
|
||||||
#=================================================
|
|
||||||
ynh_app_config_run "$1"
|
|
|
@ -72,8 +72,8 @@ pushd $install_dir/build/frontend
|
||||||
ynh_exec_as $app $ynh_node_load_PATH $ynh_npm exec gulp dist:clean
|
ynh_exec_as $app $ynh_node_load_PATH $ynh_npm exec gulp dist:clean
|
||||||
ynh_exec_as $app $ynh_node_load_PATH $ynh_npm exec gulp dist:copy
|
ynh_exec_as $app $ynh_node_load_PATH $ynh_npm exec gulp dist:copy
|
||||||
|
|
||||||
sed -i -re "s/\%version\%/$version/g" ./target/dist/index.html;
|
ynh_replace_string --match_string="%version%" --replace_string="$version" --target_file="$install_dir/build/frontend/target/dist/index.html"
|
||||||
sed -i -re "s/\%buildDate\%/$build_date/g" ./target/dist/index.html;
|
ynh_replace_string --match_string="%buildDate%" --replace_string="$build_date" --target_file="$install_dir/build/frontend/target/dist/index.html"
|
||||||
echo "$version" > target/version.txt;
|
echo "$version" > target/version.txt;
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
@ -114,7 +114,7 @@ pushd $install_dir/build/exporter
|
||||||
cp yarn.lock target/
|
cp yarn.lock target/
|
||||||
cp package.json target/
|
cp package.json target/
|
||||||
|
|
||||||
sed -i -re "s/\%version\%/$version/g" ./target/app.js
|
ynh_replace_string --match_string="%version%" --replace_string="$version" --target_file="$install_dir/build/exporter/target/app.js"
|
||||||
popd
|
popd
|
||||||
|
|
||||||
mkdir -p $install_dir/exporter
|
mkdir -p $install_dir/exporter
|
||||||
|
|
|
@ -72,8 +72,8 @@ then
|
||||||
ynh_exec_as $app $ynh_node_load_PATH $ynh_npm exec gulp dist:clean
|
ynh_exec_as $app $ynh_node_load_PATH $ynh_npm exec gulp dist:clean
|
||||||
ynh_exec_as $app $ynh_node_load_PATH $ynh_npm exec gulp dist:copy
|
ynh_exec_as $app $ynh_node_load_PATH $ynh_npm exec gulp dist:copy
|
||||||
|
|
||||||
sed -i -re "s/\%version\%/$version/g" ./target/dist/index.html;
|
ynh_replace_string --match_string="%version%" --replace_string="$version" --target_file="$install_dir/build/frontend/target/dist/index.html"
|
||||||
sed -i -re "s/\%buildDate\%/$build_date/g" ./target/dist/index.html;
|
ynh_replace_string --match_string="%buildDate%" --replace_string="$build_date" --target_file="$install_dir/build/frontend/target/dist/index.html"
|
||||||
echo "$version" > target/version.txt;
|
echo "$version" > target/version.txt;
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
@ -116,7 +116,7 @@ then
|
||||||
cp yarn.lock target/
|
cp yarn.lock target/
|
||||||
cp package.json target/
|
cp package.json target/
|
||||||
|
|
||||||
sed -i -re "s/\%version\%/$version/g" ./target/app.js
|
ynh_replace_string --match_string="%version%" --replace_string="$version" --target_file="$install_dir/build/exporter/target/app.js"
|
||||||
popd
|
popd
|
||||||
|
|
||||||
ynh_secure_remove --file=$install_dir/exporter
|
ynh_secure_remove --file=$install_dir/exporter
|
||||||
|
|
Loading…
Add table
Reference in a new issue