From 66fcc9480d777ae6b1359dfae32ace637db27f1f Mon Sep 17 00:00:00 2001 From: Mateusz <2871798+orhtej2@users.noreply.github.com> Date: Sun, 11 Feb 2024 21:09:08 +0100 Subject: [PATCH 1/3] Update .gitignore --- .gitignore | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/.gitignore b/.gitignore index 3da51e8..2f68c02 100644 --- a/.gitignore +++ b/.gitignore @@ -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] From 03472b967c26a264cc5e0296fdf9e4d6367be465 Mon Sep 17 00:00:00 2001 From: orhtej2 <2871798+orhtej2@users.noreply.github.com> Date: Sun, 11 Feb 2024 21:50:04 +0100 Subject: [PATCH 2/3] Fix permissions on $install_dir. --- scripts/install | 5 +++-- scripts/upgrade | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index d6ca80d..329a0d9 100644 --- a/scripts/install +++ b/scripts/install @@ -54,7 +54,8 @@ ynh_script_progression --message="Setting up source files..." ynh_setup_source --dest_dir="$install_dir/build" 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 @@ -78,7 +79,7 @@ popd mkdir -p $install_dir/frontend mv $install_dir/build/frontend/target/dist/* $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 diff --git a/scripts/upgrade b/scripts/upgrade index bee1b89..7b6c620 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -58,8 +58,8 @@ then # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$install_dir/build" + chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" - chmod -R 755 "$install_dir" ynh_script_progression --message="Building frontend..." --weight=5 From 87412a76dea4760d9251b1979a360a61bf45991e Mon Sep 17 00:00:00 2001 From: orhtej2 <2871798+orhtej2@users.noreply.github.com> Date: Sun, 11 Feb 2024 22:40:20 +0100 Subject: [PATCH 3/3] Fixed usages of `npm` --- scripts/install | 6 +++--- scripts/upgrade | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/install b/scripts/install index 329a0d9..431ad9d 100644 --- a/scripts/install +++ b/scripts/install @@ -67,9 +67,9 @@ pushd $install_dir/build/frontend # 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_as $app $ynh_node_load_PATH 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 npm exec gulp dist:copy + ynh_exec_as $app $ynh_node_load_PATH $ynh_npm exec gulp build + 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 sed -i -re "s/\%version\%/$version/g" ./target/dist/index.html; sed -i -re "s/\%buildDate\%/$build_date/g" ./target/dist/index.html; diff --git a/scripts/upgrade b/scripts/upgrade index 7b6c620..cce6496 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -68,9 +68,9 @@ then # 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_as $app $ynh_node_load_PATH 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 npm exec gulp dist:copy + ynh_exec_as $app $ynh_node_load_PATH $ynh_npm exec gulp build + 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 sed -i -re "s/\%version\%/$version/g" ./target/dist/index.html; sed -i -re "s/\%buildDate\%/$build_date/g" ./target/dist/index.html;