1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/penpot_ynh.git synced 2024-09-03 19:56:56 +02:00

Merge pull request #1 from YunoHost-Apps/orhtej2-patch-1

Fix permissions on $install_dir
This commit is contained in:
Mateusz 2024-02-12 10:39:25 +01:00 committed by GitHub
commit 44fc241266
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 48 additions and 9 deletions

38
.gitignore vendored
View file

@ -1,2 +1,40 @@
# Created by https://www.toptal.com/developers/gitignore/api/macos
# Edit at https://www.toptal.com/developers/gitignore?templates=macos
### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
### macOS Patch ###
# iCloud generated files
*.icloud
# End of https://www.toptal.com/developers/gitignore/api/macos
*~ *~
*.sw[op] *.sw[op]

View file

@ -54,7 +54,8 @@ ynh_script_progression --message="Setting up source files..."
ynh_setup_source --dest_dir="$install_dir/build" ynh_setup_source --dest_dir="$install_dir/build"
chown -R $app:www-data "$install_dir" chown -R $app:www-data "$install_dir"
chmod -R 755 "$install_dir" chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"
#================================================= #=================================================
# INSTALL APP # INSTALL APP
@ -66,9 +67,9 @@ pushd $install_dir/build/frontend
# ynh_exec_warn_less # ynh_exec_warn_less
ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH JAVA_HOME=$JAVA_HOME clojure -J-Xms100M -J-Xmx800M -J-XX:+UseSerialGC -M:dev:shadow-cljs release main --config-merge "{:release-version \"${current_hash}\"}" ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH JAVA_HOME=$JAVA_HOME clojure -J-Xms100M -J-Xmx800M -J-XX:+UseSerialGC -M:dev:shadow-cljs release main --config-merge "{:release-version \"${current_hash}\"}"
ynh_exec_as $app $ynh_node_load_PATH npm exec gulp build ynh_exec_as $app $ynh_node_load_PATH $ynh_npm exec gulp build
ynh_exec_as $app $ynh_node_load_PATH 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 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; sed -i -re "s/\%version\%/$version/g" ./target/dist/index.html;
sed -i -re "s/\%buildDate\%/$build_date/g" ./target/dist/index.html; sed -i -re "s/\%buildDate\%/$build_date/g" ./target/dist/index.html;
@ -78,7 +79,7 @@ popd
mkdir -p $install_dir/frontend mkdir -p $install_dir/frontend
mv $install_dir/build/frontend/target/dist/* $install_dir/frontend mv $install_dir/build/frontend/target/dist/* $install_dir/frontend
chown -R $app:www-data $install_dir/frontend chown -R $app:www-data $install_dir/frontend
chmod -R 755 $install_dir/frontend chmod -R 750 $install_dir/frontend
ynh_script_progression --message="Building backend..." --weight=5 ynh_script_progression --message="Building backend..." --weight=5

View file

@ -58,8 +58,8 @@ then
# Download, check integrity, uncompress and patch the source from app.src # Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$install_dir/build" ynh_setup_source --dest_dir="$install_dir/build"
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir" chown -R $app:www-data "$install_dir"
chmod -R 755 "$install_dir"
ynh_script_progression --message="Building frontend..." --weight=5 ynh_script_progression --message="Building frontend..." --weight=5
@ -68,9 +68,9 @@ then
# ynh_exec_warn_less # ynh_exec_warn_less
ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH JAVA_HOME=$JAVA_HOME clojure -J-Xms100M -J-Xmx800M -J-XX:+UseSerialGC -M:dev:shadow-cljs release main --config-merge "{:release-version \"${current_hash}\"}" ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH JAVA_HOME=$JAVA_HOME clojure -J-Xms100M -J-Xmx800M -J-XX:+UseSerialGC -M:dev:shadow-cljs release main --config-merge "{:release-version \"${current_hash}\"}"
ynh_exec_as $app $ynh_node_load_PATH npm exec gulp build ynh_exec_as $app $ynh_node_load_PATH $ynh_npm exec gulp build
ynh_exec_as $app $ynh_node_load_PATH 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 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; sed -i -re "s/\%version\%/$version/g" ./target/dist/index.html;
sed -i -re "s/\%buildDate\%/$build_date/g" ./target/dist/index.html; sed -i -re "s/\%buildDate\%/$build_date/g" ./target/dist/index.html;