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

Add babashka

This commit is contained in:
orhtej2 2024-02-06 23:42:47 +01:00
parent 14520cd6cc
commit 61d7468576
2 changed files with 13 additions and 5 deletions

View file

@ -56,6 +56,12 @@ ram.runtime = "50M"
arm64.url = "https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.2%2B13/OpenJDK21U-jdk_aarch64_linux_hotspot_21.0.2_13.tar.gz" arm64.url = "https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.2%2B13/OpenJDK21U-jdk_aarch64_linux_hotspot_21.0.2_13.tar.gz"
arm64.sha256 = "3ce6a2b357e2ef45fd6b53d6587aa05bfec7771e7fb982f2c964f6b771b7526a" arm64.sha256 = "3ce6a2b357e2ef45fd6b53d6587aa05bfec7771e7fb982f2c964f6b771b7526a"
[resources.sources.babashka]
amd64.url = "https://github.com/babashka/babashka/releases/download/v1.3.188/babashka-1.3.188-linux-amd64-static.tar.gz"
amd64.sha256 = "89431b0659e84a468da05ad78daf2982cbc8ea9e17f315fa2e51fecc78af7cc0"
arm64.url = "https://github.com/babashka/babashka/releases/download/v1.3.188/babashka-1.3.188-linux-aarch64-static.tar.gz"
arm64.sha256 = "417280537b20754b675b7552d560c4c2817a93fbcaa0d51e426a1bff385e3e47"
[resources.system_user] [resources.system_user]
[resources.install_dir] [resources.install_dir]

View file

@ -38,7 +38,9 @@ popd
ynh_secure_remove --file=$tmp_dir ynh_secure_remove --file=$tmp_dir
export PATH=$install_dir/clojure/bin:$PATH ynh_setup_source --dest_dir="$install_dir/babashka" --source_id="babashka" --in_subdir=false
export PATH=$install_dir/clojure/bin:$install_dir/babashka:$PATH
#================================================= #=================================================
# APP "BUILD" (DEPLOYING SOURCES, VENV, COMPILING ETC) # APP "BUILD" (DEPLOYING SOURCES, VENV, COMPILING ETC)
@ -57,10 +59,10 @@ chown -R $app:$app "$install_dir"
ynh_script_progression --message="Building frontend..." --weight=5 ynh_script_progression --message="Building frontend..." --weight=5
pushd $install_dir/build/frontend pushd $install_dir/build/frontend
ynh_exec_as $app env $ynh_node_load_PATH yarn install --pure-lockfile ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn install --pure-lockfile
# 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 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:clean
ynh_exec_as $app $ynh_node_load_PATH npm exec gulp dist:copy ynh_exec_as $app $ynh_node_load_PATH npm exec gulp dist:copy
@ -82,7 +84,7 @@ pushd $install_dir/build/backend
echo "$(ynh_app_upstream_version)" > target/classes/version.txt; echo "$(ynh_app_upstream_version)" > target/classes/version.txt;
chown -R $app:$app target chown -R $app:$app target
ynh_exec_as $app env PATH=$PATH JAVA_HOME=$JAVA_HOME clojure -T:build jar; ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH JAVA_HOME=$JAVA_HOME clojure -T:build jar;
mv target/penpot.jar target/dist/penpot.jar mv target/penpot.jar target/dist/penpot.jar
cp resources/log4j2.xml target/dist/log4j2.xml cp resources/log4j2.xml target/dist/log4j2.xml
@ -100,7 +102,7 @@ chmod -R 700 $install_dir/backend
ynh_script_progression --message="Building exporter..." --weight=5 ynh_script_progression --message="Building exporter..." --weight=5
pushd $install_dir/build/exporter pushd $install_dir/build/exporter
ynh_exec_as $app env PATH=$PATH JAVA_HOME=$JAVA_HOME NODE_ENV=production clojure -M:dev:shadow-cljs release main;; ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH JAVA_HOME=$JAVA_HOME NODE_ENV=production clojure -M:dev:shadow-cljs release main;;
cp yarn.lock target/; cp yarn.lock target/;
cp package.json target/; cp package.json target/;