mirror of
https://github.com/YunoHost-Apps/penpot_ynh.git
synced 2024-09-03 19:56:56 +02:00
commit
026d02193a
12 changed files with 323 additions and 188 deletions
|
@ -1,6 +1,7 @@
|
||||||
# All available README files by language
|
# All available README files by language
|
||||||
|
|
||||||
- [Read the README in English](README.md)
|
- [Read the README in English](README.md)
|
||||||
|
- [Irakurri README euskaraz](README_eu.md)
|
||||||
- [Lire le README en français](README_fr.md)
|
- [Lire le README en français](README_fr.md)
|
||||||
- [Le o README en galego](README_gl.md)
|
- [Le o README en galego](README_gl.md)
|
||||||
- [Leggi il “README” in italiano](README_it.md)
|
- [阅读中文(简体)的 README](README_zh_Hans.md)
|
||||||
|
|
|
@ -9,7 +9,7 @@ It shall NOT be edited by hand.
|
||||||
|
|
||||||
[](https://install-app.yunohost.org/?app=penpot)
|
[](https://install-app.yunohost.org/?app=penpot)
|
||||||
|
|
||||||
*[Read this README is other languages.](./ALL_README.md)*
|
*[Read this README in other languages.](./ALL_README.md)*
|
||||||
|
|
||||||
> *This package allows you to install Penpot quickly and simply on a YunoHost server.*
|
> *This package allows you to install Penpot quickly and simply on a YunoHost server.*
|
||||||
> *If you don't have YunoHost, please consult [the guide](https://yunohost.org/install) to learn how to install it.*
|
> *If you don't have YunoHost, please consult [the guide](https://yunohost.org/install) to learn how to install it.*
|
||||||
|
@ -18,7 +18,7 @@ It shall NOT be edited by hand.
|
||||||
|
|
||||||
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.
|
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~ynh3
|
**Shipped version:** 2.0.2~ynh1
|
||||||
|
|
||||||
## Screenshots
|
## Screenshots
|
||||||
|
|
||||||
|
|
48
README_eu.md
Normal file
48
README_eu.md
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
<!--
|
||||||
|
Ohart ongi: README hau automatikoki sortu da <https://github.com/YunoHost/apps/tree/master/tools/readme_generator>ri esker
|
||||||
|
EZ editatu eskuz.
|
||||||
|
-->
|
||||||
|
|
||||||
|
# Penpot YunoHost-erako
|
||||||
|
|
||||||
|
[](https://dash.yunohost.org/appci/app/penpot)  
|
||||||
|
|
||||||
|
[](https://install-app.yunohost.org/?app=penpot)
|
||||||
|
|
||||||
|
*[Irakurri README hau beste hizkuntzatan.](./ALL_README.md)*
|
||||||
|
|
||||||
|
> *Pakete honek Penpot YunoHost zerbitzari batean azkar eta zailtasunik gabe instalatzea ahalbidetzen dizu.*
|
||||||
|
> *YunoHost ez baduzu, kontsultatu [gida](https://yunohost.org/install) nola instalatu ikasteko.*
|
||||||
|
|
||||||
|
## Aurreikuspena
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
**Paketatutako bertsioa:** 2.0.2~ynh1
|
||||||
|
|
||||||
|
## Pantaila-argazkiak
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Dokumentazioa eta baliabideak
|
||||||
|
|
||||||
|
- Aplikazioaren webgune ofiziala: <https://penpot.app/>
|
||||||
|
- Erabiltzaileen dokumentazio ofiziala: <https://help.penpot.app/user-guide/>
|
||||||
|
- Administratzaileen dokumentazio ofiziala: <https://help.penpot.app/technical-guide/>
|
||||||
|
- Jatorrizko aplikazioaren kode-gordailua: <https://github.com/penpot/penpot>
|
||||||
|
- YunoHost Denda: <https://apps.yunohost.org/app/penpot>
|
||||||
|
- Eman errore baten berri: <https://github.com/YunoHost-Apps/penpot_ynh/issues>
|
||||||
|
|
||||||
|
## Garatzaileentzako informazioa
|
||||||
|
|
||||||
|
Bidali `pull request`a [`testing` abarrera](https://github.com/YunoHost-Apps/penpot_ynh/tree/testing).
|
||||||
|
|
||||||
|
`testing` abarra probatzeko, ondorengoa egin:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo yunohost app install https://github.com/YunoHost-Apps/penpot_ynh/tree/testing --debug
|
||||||
|
edo
|
||||||
|
sudo yunohost app upgrade penpot -u https://github.com/YunoHost-Apps/penpot_ynh/tree/testing --debug
|
||||||
|
```
|
||||||
|
|
||||||
|
**Informazio gehiago aplikazioaren paketatzeari buruz:** <https://yunohost.org/packaging_apps>
|
|
@ -18,7 +18,7 @@ Il NE doit PAS être modifié à la main.
|
||||||
|
|
||||||
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.
|
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~ynh3
|
**Version incluse :** 2.0.2~ynh1
|
||||||
|
|
||||||
## Captures d’écran
|
## Captures d’écran
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ NON debe editarse manualmente.
|
||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
||||||
**Versión proporcionada:** 1.19.3~ynh3
|
**Versión proporcionada:** 2.0.2~ynh1
|
||||||
|
|
||||||
## Capturas de pantalla
|
## Capturas de pantalla
|
||||||
|
|
||||||
|
|
48
README_zh_Hans.md
Normal file
48
README_zh_Hans.md
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
<!--
|
||||||
|
注意:此 README 由 <https://github.com/YunoHost/apps/tree/master/tools/readme_generator> 自动生成
|
||||||
|
请勿手动编辑。
|
||||||
|
-->
|
||||||
|
|
||||||
|
# YunoHost 的 Penpot
|
||||||
|
|
||||||
|
[](https://dash.yunohost.org/appci/app/penpot)  
|
||||||
|
|
||||||
|
[](https://install-app.yunohost.org/?app=penpot)
|
||||||
|
|
||||||
|
*[阅读此 README 的其它语言版本。](./ALL_README.md)*
|
||||||
|
|
||||||
|
> *通过此软件包,您可以在 YunoHost 服务器上快速、简单地安装 Penpot。*
|
||||||
|
> *如果您还没有 YunoHost,请参阅[指南](https://yunohost.org/install)了解如何安装它。*
|
||||||
|
|
||||||
|
## 概况
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
**分发版本:** 2.0.2~ynh1
|
||||||
|
|
||||||
|
## 截图
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## 文档与资源
|
||||||
|
|
||||||
|
- 官方应用网站: <https://penpot.app/>
|
||||||
|
- 官方用户文档: <https://help.penpot.app/user-guide/>
|
||||||
|
- 官方管理文档: <https://help.penpot.app/technical-guide/>
|
||||||
|
- 上游应用代码库: <https://github.com/penpot/penpot>
|
||||||
|
- YunoHost 商店: <https://apps.yunohost.org/app/penpot>
|
||||||
|
- 报告 bug: <https://github.com/YunoHost-Apps/penpot_ynh/issues>
|
||||||
|
|
||||||
|
## 开发者信息
|
||||||
|
|
||||||
|
请向 [`testing` 分支](https://github.com/YunoHost-Apps/penpot_ynh/tree/testing) 发送拉取请求。
|
||||||
|
|
||||||
|
如要尝试 `testing` 分支,请这样操作:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo yunohost app install https://github.com/YunoHost-Apps/penpot_ynh/tree/testing --debug
|
||||||
|
或
|
||||||
|
sudo yunohost app upgrade penpot -u https://github.com/YunoHost-Apps/penpot_ynh/tree/testing --debug
|
||||||
|
```
|
||||||
|
|
||||||
|
**有关应用打包的更多信息:** <https://yunohost.org/packaging_apps>
|
|
@ -6,7 +6,7 @@ name = "Penpot"
|
||||||
description.en = "Design and prototyping platform"
|
description.en = "Design and prototyping platform"
|
||||||
description.fr = "Plateforme de conception et de prototypage"
|
description.fr = "Plateforme de conception et de prototypage"
|
||||||
|
|
||||||
version = "1.19.3~ynh3"
|
version = "2.0.2~ynh1"
|
||||||
|
|
||||||
maintainers = ["orhtej2"]
|
maintainers = ["orhtej2"]
|
||||||
|
|
||||||
|
@ -42,22 +42,28 @@ ram.runtime = "50M"
|
||||||
[resources.sources]
|
[resources.sources]
|
||||||
|
|
||||||
[resources.sources.main]
|
[resources.sources.main]
|
||||||
url = "https://github.com/penpot/penpot/archive/refs/tags/1.19.3.tar.gz"
|
url = "https://github.com/penpot/penpot/archive/refs/tags/2.0.2.tar.gz"
|
||||||
sha256 = "2649db3bd8742540f76f33547095b227e86c5bda74908a900011b8516d4bb3ce"
|
sha256 = "52b3e81d2032055f3d845e2e6db03ba266d159532939e26347ba340f20515337"
|
||||||
|
autoupdate.strategy = "latest_github_tag"
|
||||||
|
|
||||||
[resources.sources.jdk]
|
[resources.sources.jdk]
|
||||||
amd64.url = "https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.2%2B13/OpenJDK21U-jdk_x64_linux_hotspot_21.0.2_13.tar.gz"
|
amd64.url = "https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.3%2B9/OpenJDK21U-jdk_x64_linux_hotspot_21.0.3_9.tar.gz"
|
||||||
amd64.sha256 = "454bebb2c9fe48d981341461ffb6bf1017c7b7c6e15c6b0c29b959194ba3aaa5"
|
amd64.sha256 = "fffa52c22d797b715a962e6c8d11ec7d79b90dd819b5bc51d62137ea4b22a340"
|
||||||
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.3%2B9/OpenJDK21U-jdk_aarch64_linux_hotspot_21.0.3_9.tar.gz"
|
||||||
arm64.sha256 = "3ce6a2b357e2ef45fd6b53d6587aa05bfec7771e7fb982f2c964f6b771b7526a"
|
arm64.sha256 = "7d3ab0e8eba95bd682cfda8041c6cb6fa21e09d0d9131316fd7c96c78969de31"
|
||||||
|
autoupdate.strategy = "latest_github_release"
|
||||||
|
autoupdate.asset.amd64 = "jdk-.*-jdk_x64_linux_hotspot_.*\\.tar\\.gz"
|
||||||
|
autoupdate.asset.arm64 = "jdk-.*-jdk_aarch64_linux_hotspot_.*\\.tar\\.gz"
|
||||||
|
|
||||||
[resources.sources.babashka]
|
[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.url = "https://github.com/babashka/babashka/releases/download/v1.3.190/babashka-1.3.190-linux-amd64-static.tar.gz"
|
||||||
amd64.sha256 = "89431b0659e84a468da05ad78daf2982cbc8ea9e17f315fa2e51fecc78af7cc0"
|
amd64.sha256 = "b974fd4b0bf9c05a65dec59c165339a02d157e4571f80b570ab0734fc3fa5855"
|
||||||
arm64.url = "https://github.com/babashka/babashka/releases/download/v1.3.188/babashka-1.3.188-linux-aarch64-static.tar.gz"
|
arm64.url = "https://github.com/babashka/babashka/releases/download/v1.3.190/babashka-1.3.190-linux-aarch64-static.tar.gz"
|
||||||
arm64.sha256 = "417280537b20754b675b7552d560c4c2817a93fbcaa0d51e426a1bff385e3e47"
|
arm64.sha256 = "3832a48fb0f5da1343bd1cc520db2759b28c90774ab53779c288952191f26f62"
|
||||||
in_subdir = false
|
in_subdir = false
|
||||||
|
autoupdate.strategy = "latest_github_release"
|
||||||
|
autoupdate.asset.amd64 = "babashka-.*-linux-amd64-static\\.tar\\.gz"
|
||||||
|
autoupdate.asset.arm64 = "babashka-.*-linux-aarch64-static\\.tar\\.gz"
|
||||||
[resources.system_user]
|
[resources.system_user]
|
||||||
allow_email = true
|
allow_email = true
|
||||||
|
|
||||||
|
@ -129,11 +135,9 @@ ram.runtime = "50M"
|
||||||
"woff2",
|
"woff2",
|
||||||
"python3",
|
"python3",
|
||||||
"python3-tabulate",
|
"python3-tabulate",
|
||||||
"fontforge"
|
"fontforge",
|
||||||
|
"rsync"
|
||||||
]
|
]
|
||||||
extras.yarn.repo = "deb https://dl.yarnpkg.com/debian/ stable main"
|
|
||||||
extras.yarn.key = "https://dl.yarnpkg.com/debian/pubkey.gpg"
|
|
||||||
extras.yarn.packages = "yarn"
|
|
||||||
|
|
||||||
[resources.database]
|
[resources.database]
|
||||||
type = "postgresql"
|
type = "postgresql"
|
||||||
|
|
|
@ -4,9 +4,9 @@
|
||||||
# COMMON VARIABLES
|
# COMMON VARIABLES
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
nodejs_version=20
|
nodejs_version=21
|
||||||
current_hash="1eaf7b2b4"
|
current_hash="380c77a7"
|
||||||
version="1.19.3-10698-g1eaf7b2b4"
|
version="2.0.2-10698-g380c77a7"
|
||||||
build_date="Mon, 18 Sep 2023 09:14:03 +0000"
|
build_date="Mon, 18 Sep 2023 09:14:03 +0000"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -64,21 +64,23 @@ chmod -R o-rwx "$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_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn install --pure-lockfile
|
ynh_exec_warn_less env $ynh_node_load_PATH COREPACK_ENABLE_DOWNLOAD_PROMPT=0 corepack enable
|
||||||
|
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH COREPACK_ENABLE_DOWNLOAD_PROMPT=0 corepack enable
|
||||||
|
ynh_exec_warn_less ynh_exec_as "$app" env $ynh_node_load_PATH COREPACK_ENABLE_DOWNLOAD_PROMPT=0 corepack prepare --activate
|
||||||
|
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production COREPACK_ENABLE_DOWNLOAD_PROMPT=0 yarn install --immutable
|
||||||
|
|
||||||
# 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 NODE_ENV=production 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 $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
|
|
||||||
|
|
||||||
ynh_replace_string --match_string="%version%" --replace_string="$version" --target_file="$install_dir/build/frontend/target/dist/index.html"
|
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production yarn run compile
|
||||||
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;
|
ynh_replace_string --match_string="%version%" --replace_string="$version" --target_file="$install_dir/build/frontend/resources/public/index.html"
|
||||||
|
ynh_replace_string --match_string="%buildDate%" --replace_string="$build_date" --target_file="$install_dir/build/frontend/resources/public/index.html"
|
||||||
|
#echo "$version" > target/version.txt;
|
||||||
popd
|
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/resources/public/* $install_dir/frontend
|
||||||
chown -R $app:www-data $install_dir/frontend
|
chown -R $app:www-data $install_dir/frontend
|
||||||
chmod -R 750 $install_dir/frontend
|
chmod -R 750 $install_dir/frontend
|
||||||
|
|
||||||
|
@ -88,6 +90,7 @@ pushd $install_dir/build/backend
|
||||||
mkdir -p target/classes;
|
mkdir -p target/classes;
|
||||||
mkdir -p target/dist;
|
mkdir -p target/dist;
|
||||||
echo "$version" > target/classes/version.txt;
|
echo "$version" > target/classes/version.txt;
|
||||||
|
cp ../CHANGES.md target/classes/changelog.md;
|
||||||
chown -R $app:$app target
|
chown -R $app:$app target
|
||||||
|
|
||||||
ynh_exec_warn_less 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;
|
||||||
|
@ -110,6 +113,9 @@ 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_warn_less ynh_exec_as "$app" env $ynh_node_load_PATH corepack prepare --activate
|
||||||
|
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn install --immutable
|
||||||
|
ynh_secure_remove --file="target"
|
||||||
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
|
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/
|
||||||
|
@ -119,14 +125,16 @@ popd
|
||||||
|
|
||||||
mkdir -p $install_dir/exporter
|
mkdir -p $install_dir/exporter
|
||||||
mv $install_dir/build/exporter/target/* $install_dir/exporter
|
mv $install_dir/build/exporter/target/* $install_dir/exporter
|
||||||
|
cp $install_dir/build/.yarnrc.yml $install_dir/exporter
|
||||||
chown -R $app:$app $install_dir/exporter
|
chown -R $app:$app $install_dir/exporter
|
||||||
chmod -R 700 $install_dir/exporter
|
chmod -R 700 $install_dir/exporter
|
||||||
|
|
||||||
ynh_secure_remove --file=$install_dir/.cache
|
ynh_secure_remove --file=$install_dir/.cache
|
||||||
|
|
||||||
pushd $install_dir/exporter
|
pushd $install_dir/exporter
|
||||||
ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production yarn install --pure-lockfile
|
ynh_exec_warn_less ynh_exec_as "$app" env $ynh_node_load_PATH corepack prepare --activate
|
||||||
ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production yarn --network-timeout 1000000 run playwright install chromium
|
ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production yarn install --immutable
|
||||||
|
ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production yarn run playwright install chromium
|
||||||
popd
|
popd
|
||||||
|
|
||||||
ynh_script_progression --message="Cleaning up..." --weight=1
|
ynh_script_progression --message="Cleaning up..." --weight=1
|
||||||
|
|
175
scripts/upgrade
175
scripts/upgrade
|
@ -36,115 +36,122 @@ ynh_use_nodejs
|
||||||
|
|
||||||
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||||
then
|
then
|
||||||
ynh_setup_source --dest_dir="$install_dir/jdk" --source_id="jdk"
|
ynh_setup_source --dest_dir="$install_dir/jdk" --source_id="jdk"
|
||||||
export JAVA_HOME=$install_dir/jdk
|
export JAVA_HOME=$install_dir/jdk
|
||||||
|
|
||||||
chown -R $app:www-data "$install_dir"
|
chown -R $app:www-data "$install_dir"
|
||||||
tmp_dir=$(mktemp -d)
|
tmp_dir=$(mktemp -d)
|
||||||
|
|
||||||
pushd $tmp_dir
|
pushd $tmp_dir
|
||||||
curl -L -O https://github.com/clojure/brew-install/releases/latest/download/linux-install.sh
|
curl -L -O https://github.com/clojure/brew-install/releases/latest/download/linux-install.sh
|
||||||
chmod +x linux-install.sh
|
chmod +x linux-install.sh
|
||||||
ynh_exec_warn_less ./linux-install.sh -p $install_dir/clojure
|
ynh_exec_warn_less ./linux-install.sh -p $install_dir/clojure
|
||||||
popd
|
popd
|
||||||
|
|
||||||
ynh_secure_remove --file=$tmp_dir
|
ynh_secure_remove --file=$tmp_dir
|
||||||
|
|
||||||
ynh_setup_source --dest_dir="$install_dir/babashka" --source_id="babashka"
|
ynh_setup_source --dest_dir="$install_dir/babashka" --source_id="babashka"
|
||||||
|
|
||||||
export PATH=$JAVA_HOME/bin:$install_dir/clojure/bin:$install_dir/babashka:$PATH
|
export PATH=$JAVA_HOME/bin:$install_dir/clojure/bin:$install_dir/babashka:$PATH
|
||||||
|
|
||||||
ynh_script_progression --message="Upgrading source files..."
|
ynh_script_progression --message="Upgrading source files..."
|
||||||
|
|
||||||
# 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"
|
chmod -R o-rwx "$install_dir"
|
||||||
chown -R $app:www-data "$install_dir"
|
chown -R $app:www-data "$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_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn install --pure-lockfile
|
ynh_exec_warn_less env $ynh_node_load_PATH COREPACK_ENABLE_DOWNLOAD_PROMPT=0 corepack enable
|
||||||
|
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH COREPACK_ENABLE_DOWNLOAD_PROMPT=0 corepack enable
|
||||||
|
ynh_exec_warn_less ynh_exec_as "$app" env $ynh_node_load_PATH COREPACK_ENABLE_DOWNLOAD_PROMPT=0 corepack prepare --activate
|
||||||
|
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production COREPACK_ENABLE_DOWNLOAD_PROMPT=0 yarn install --immutable
|
||||||
|
|
||||||
# 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 NODE_ENV=production 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 $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
|
|
||||||
|
|
||||||
ynh_replace_string --match_string="%version%" --replace_string="$version" --target_file="$install_dir/build/frontend/target/dist/index.html"
|
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production yarn run compile
|
||||||
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;
|
|
||||||
popd
|
|
||||||
|
|
||||||
ynh_secure_remove --file=$install_dir/frontend
|
ynh_replace_string --match_string="%version%" --replace_string="$version" --target_file="$install_dir/build/frontend/resources/public/index.html"
|
||||||
mkdir -p $install_dir/frontend
|
ynh_replace_string --match_string="%buildDate%" --replace_string="$build_date" --target_file="$install_dir/build/frontend/resources/public/index.html"
|
||||||
mv $install_dir/build/frontend/target/dist/* $install_dir/frontend
|
popd
|
||||||
chown -R $app:www-data $install_dir/frontend
|
|
||||||
chmod -R 755 $install_dir/frontend
|
|
||||||
|
|
||||||
ynh_script_progression --message="Building backend..." --weight=5
|
ynh_secure_remove --file=$install_dir/frontend
|
||||||
|
mkdir -p $install_dir/frontend
|
||||||
|
mv $install_dir/build/frontend/resources/public/* $install_dir/frontend
|
||||||
|
chown -R $app:www-data $install_dir/frontend
|
||||||
|
chmod -R 755 $install_dir/frontend
|
||||||
|
|
||||||
pushd $install_dir/build/backend
|
ynh_script_progression --message="Building backend..." --weight=5
|
||||||
mkdir -p target/classes;
|
|
||||||
mkdir -p target/dist;
|
|
||||||
echo "$version" > target/classes/version.txt;
|
|
||||||
chown -R $app:$app target
|
|
||||||
|
|
||||||
ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH JAVA_HOME=$JAVA_HOME clojure -T:build jar;
|
pushd $install_dir/build/backend
|
||||||
mv target/penpot.jar target/dist/penpot.jar
|
mkdir -p target/classes;
|
||||||
cp resources/log4j2.xml target/dist/log4j2.xml
|
mkdir -p target/dist;
|
||||||
cp scripts/run.template.sh target/dist/run.sh
|
echo "$version" > target/classes/version.txt;
|
||||||
chmod +x target/dist/run.sh;
|
cp ../CHANGES.md target/classes/changelog.md;
|
||||||
|
chown -R $app:$app target
|
||||||
|
|
||||||
# Prefetch templates
|
ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH JAVA_HOME=$JAVA_HOME clojure -T:build jar;
|
||||||
mkdir builtin-templates;
|
mv target/penpot.jar target/dist/penpot.jar
|
||||||
bb ./scripts/prefetch-templates.clj resources/app/onboarding.edn builtin-templates/
|
cp resources/log4j2.xml target/dist/log4j2.xml
|
||||||
cp -r builtin-templates target/dist/
|
cp scripts/run.template.sh target/dist/run.sh
|
||||||
popd
|
chmod +x target/dist/run.sh;
|
||||||
|
|
||||||
ynh_secure_remove --file=$install_dir/backend
|
# Prefetch templates
|
||||||
mkdir -p $install_dir/backend
|
mkdir builtin-templates;
|
||||||
mv $install_dir/build/backend/target/dist/* $install_dir/backend
|
bb ./scripts/prefetch-templates.clj resources/app/onboarding.edn builtin-templates/
|
||||||
chown -R $app:$app $install_dir/backend
|
cp -r builtin-templates target/dist/
|
||||||
chmod -R 700 $install_dir/backend
|
popd
|
||||||
|
|
||||||
ynh_script_progression --message="Building exporter..." --weight=5
|
ynh_secure_remove --file=$install_dir/backend
|
||||||
|
mkdir -p $install_dir/backend
|
||||||
|
mv $install_dir/build/backend/target/dist/* $install_dir/backend
|
||||||
|
chown -R $app:$app $install_dir/backend
|
||||||
|
chmod -R 700 $install_dir/backend
|
||||||
|
|
||||||
pushd $install_dir/build/exporter
|
ynh_script_progression --message="Building exporter..." --weight=5
|
||||||
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 package.json target/
|
|
||||||
|
|
||||||
ynh_replace_string --match_string="%version%" --replace_string="$version" --target_file="$install_dir/build/exporter/target/app.js"
|
pushd $install_dir/build/exporter
|
||||||
popd
|
ynh_exec_warn_less ynh_exec_as "$app" env $ynh_node_load_PATH corepack prepare --activate
|
||||||
|
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn install --immutable
|
||||||
|
ynh_secure_remove --file="target"
|
||||||
|
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 package.json target/
|
||||||
|
|
||||||
ynh_secure_remove --file=$install_dir/exporter
|
ynh_replace_string --match_string="%version%" --replace_string="$version" --target_file="$install_dir/build/exporter/target/app.js"
|
||||||
mkdir -p $install_dir/exporter
|
popd
|
||||||
mv $install_dir/build/exporter/target/* $install_dir/exporter
|
|
||||||
chown -R $app:$app $install_dir/exporter
|
|
||||||
chmod -R 700 $install_dir/exporter
|
|
||||||
|
|
||||||
ynh_secure_remove --file=$install_dir/.cache
|
ynh_secure_remove --file=$install_dir/exporter
|
||||||
|
mkdir -p $install_dir/exporter
|
||||||
|
mv $install_dir/build/exporter/target/* $install_dir/exporter
|
||||||
|
cp $install_dir/build/.yarnrc.yml $install_dir/exporter
|
||||||
|
chown -R $app:$app $install_dir/exporter
|
||||||
|
chmod -R 700 $install_dir/exporter
|
||||||
|
|
||||||
pushd $install_dir/exporter
|
ynh_secure_remove --file=$install_dir/.cache
|
||||||
ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production yarn install --pure-lockfile
|
|
||||||
ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production yarn --network-timeout 1000000 run playwright install chromium
|
|
||||||
popd
|
|
||||||
|
|
||||||
ynh_script_progression --message="Cleaning up..." --weight=1
|
pushd $install_dir/exporter
|
||||||
|
ynh_exec_warn_less ynh_exec_as "$app" env $ynh_node_load_PATH corepack prepare --activate
|
||||||
|
ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production yarn install --immutable
|
||||||
|
ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production yarn run playwright install chromium
|
||||||
|
popd
|
||||||
|
|
||||||
ynh_secure_remove --file=$install_dir/.npm
|
ynh_script_progression --message="Cleaning up..." --weight=1
|
||||||
ynh_secure_remove --file=$install_dir/.yarn
|
|
||||||
ynh_secure_remove --file=$install_dir/build
|
ynh_secure_remove --file=$install_dir/.npm
|
||||||
ynh_secure_remove --file=$install_dir/.m2
|
ynh_secure_remove --file=$install_dir/.yarn
|
||||||
ynh_secure_remove --file=$install_dir/.clojure
|
ynh_secure_remove --file=$install_dir/build
|
||||||
ynh_secure_remove --file=$install_dir/clojure
|
ynh_secure_remove --file=$install_dir/.m2
|
||||||
ynh_secure_remove --file=$install_dir/babashka
|
ynh_secure_remove --file=$install_dir/.clojure
|
||||||
ynh_secure_remove --file=$install_dir/.cache/ms-playwright/firefox-*
|
ynh_secure_remove --file=$install_dir/clojure
|
||||||
ynh_secure_remove --file=$install_dir/.cache/ms-playwright/webkit-*
|
ynh_secure_remove --file=$install_dir/babashka
|
||||||
ynh_secure_remove --file=$install_dir/.cache/yarn
|
ynh_secure_remove --file=$install_dir/.cache/ms-playwright/firefox-*
|
||||||
ynh_secure_remove --file=$install_dir/.cache/node
|
ynh_secure_remove --file=$install_dir/.cache/ms-playwright/webkit-*
|
||||||
|
ynh_secure_remove --file=$install_dir/.cache/yarn
|
||||||
|
ynh_secure_remove --file=$install_dir/.cache/node
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
82
sources/patches/main-002.patch
Normal file
82
sources/patches/main-002.patch
Normal file
|
@ -0,0 +1,82 @@
|
||||||
|
diff --git a/backend/src/app/migrations/sql/0108-mod-file-thumbnail-table.sql b/backend/src/app/migrations/sql/0108-mod-file-thumbnail-table.sql
|
||||||
|
index b7d05bdc7..57dc229ca 100645
|
||||||
|
--- a/backend/src/app/migrations/sql/0108-mod-file-thumbnail-table.sql
|
||||||
|
+++ b/backend/src/app/migrations/sql/0108-mod-file-thumbnail-table.sql
|
||||||
|
@@ -18,7 +18,8 @@ ALTER TABLE file_thumbnail
|
||||||
|
ADD FOREIGN KEY (media_id) REFERENCES storage_object(id) DEFERRABLE;
|
||||||
|
|
||||||
|
--- Add deletion protection
|
||||||
|
-CREATE OR REPLACE TRIGGER deletion_protection__tgr
|
||||||
|
+DROP TRIGGER IF EXISTS deletion_protection__tgr on file_thumbnail;
|
||||||
|
+CREATE TRIGGER deletion_protection__tgr
|
||||||
|
BEFORE DELETE ON file_thumbnail FOR EACH STATEMENT
|
||||||
|
WHEN ((current_setting('rules.deletion_protection', true) IN ('on', '')) OR
|
||||||
|
(current_setting('rules.deletion_protection', true) IS NULL))
|
||||||
|
diff --git a/backend/src/app/migrations/sql/0109-mod-file-tagged-object-thumbnail-table.sql b/backend/src/app/migrations/sql/0109-mod-file-tagged-object-thumbnail-table.sql
|
||||||
|
index 3184a6576..37e77d3e1 100644
|
||||||
|
--- a/backend/src/app/migrations/sql/0109-mod-file-tagged-object-thumbnail-table.sql
|
||||||
|
+++ b/backend/src/app/migrations/sql/0109-mod-file-tagged-object-thumbnail-table.sql
|
||||||
|
@@ -19,7 +19,8 @@ ALTER TABLE file_tagged_object_thumbnail
|
||||||
|
ADD FOREIGN KEY (file_id) REFERENCES file(id) DEFERRABLE;
|
||||||
|
|
||||||
|
--- Add deletion protection
|
||||||
|
-CREATE OR REPLACE TRIGGER deletion_protection__tgr
|
||||||
|
+DROP TRIGGER IF EXISTS deletion_protection__tgr on file_tagged_object_thumbnail;
|
||||||
|
+CREATE TRIGGER deletion_protection__tgr
|
||||||
|
BEFORE DELETE ON file_tagged_object_thumbnail FOR EACH STATEMENT
|
||||||
|
WHEN ((current_setting('rules.deletion_protection', true) IN ('on', '')) OR
|
||||||
|
(current_setting('rules.deletion_protection', true) IS NULL))
|
||||||
|
diff --git a/backend/src/app/migrations/sql/0110-mod-file-media-object-table.sql b/backend/src/app/migrations/sql/0110-mod-file-media-object-table.sql
|
||||||
|
index 49cbebc96..cbf480079 100644
|
||||||
|
--- a/backend/src/app/migrations/sql/0110-mod-file-media-object-table.sql
|
||||||
|
+++ b/backend/src/app/migrations/sql/0110-mod-file-media-object-table.sql
|
||||||
|
@@ -20,7 +20,8 @@ ALTER TABLE file_media_object
|
||||||
|
ADD FOREIGN KEY (file_id) REFERENCES file(id) DEFERRABLE;
|
||||||
|
|
||||||
|
--- Add deletion protection
|
||||||
|
-CREATE OR REPLACE TRIGGER deletion_protection__tgr
|
||||||
|
+DROP TRIGGER IF EXISTS deletion_protection__tgr on file_media_object;
|
||||||
|
+CREATE TRIGGER deletion_protection__tgr
|
||||||
|
BEFORE DELETE ON file_media_object FOR EACH STATEMENT
|
||||||
|
WHEN ((current_setting('rules.deletion_protection', true) IN ('on', '')) OR
|
||||||
|
(current_setting('rules.deletion_protection', true) IS NULL))
|
||||||
|
diff --git a/backend/src/app/migrations/sql/0112-mod-profile-table.sql b/backend/src/app/migrations/sql/0112-mod-profile-table.sql
|
||||||
|
index 2db8d75b0..ae2f1c8fe 100644
|
||||||
|
--- a/backend/src/app/migrations/sql/0112-mod-profile-table.sql
|
||||||
|
+++ b/backend/src/app/migrations/sql/0112-mod-profile-table.sql
|
||||||
|
@@ -7,7 +7,8 @@ ALTER TABLE profile
|
||||||
|
ADD FOREIGN KEY (default_team_id) REFERENCES team(id) DEFERRABLE;
|
||||||
|
|
||||||
|
--- Add deletion protection
|
||||||
|
-CREATE OR REPLACE TRIGGER deletion_protection__tgr
|
||||||
|
+DROP TRIGGER IF EXISTS deletion_protection__tgr on profile;
|
||||||
|
+CREATE TRIGGER deletion_protection__tgr
|
||||||
|
BEFORE DELETE ON profile FOR EACH STATEMENT
|
||||||
|
WHEN ((current_setting('rules.deletion_protection', true) IN ('on', '')) OR
|
||||||
|
(current_setting('rules.deletion_protection', true) IS NULL))
|
||||||
|
diff --git a/backend/src/app/migrations/sql/0113-mod-team-font-variant-table.sql b/backend/src/app/migrations/sql/0113-mod-team-font-variant-table.sql
|
||||||
|
index b9caa08f6..b80806fb1 100644
|
||||||
|
--- a/backend/src/app/migrations/sql/0113-mod-team-font-variant-table.sql
|
||||||
|
+++ b/backend/src/app/migrations/sql/0113-mod-team-font-variant-table.sql
|
||||||
|
@@ -13,7 +13,8 @@ ALTER TABLE team_font_variant
|
||||||
|
ADD FOREIGN KEY (team_id) REFERENCES team(id) DEFERRABLE;
|
||||||
|
|
||||||
|
--- Add deletion protection
|
||||||
|
-CREATE OR REPLACE TRIGGER deletion_protection__tgr
|
||||||
|
+DROP TRIGGER IF EXISTS deletion_protection__tgr on team_font_variant;
|
||||||
|
+CREATE TRIGGER deletion_protection__tgr
|
||||||
|
BEFORE DELETE ON team_font_variant FOR EACH STATEMENT
|
||||||
|
WHEN ((current_setting('rules.deletion_protection', true) IN ('on', '')) OR
|
||||||
|
(current_setting('rules.deletion_protection', true) IS NULL))
|
||||||
|
diff --git a/backend/src/app/migrations/sql/0114-mod-team-table.sql b/backend/src/app/migrations/sql/0114-mod-team-table.sql
|
||||||
|
index 8c7675643..df6c17016 100644
|
||||||
|
--- a/backend/src/app/migrations/sql/0114-mod-team-table.sql
|
||||||
|
+++ b/backend/src/app/migrations/sql/0114-mod-team-table.sql
|
||||||
|
@@ -1,4 +1,5 @@
|
||||||
|
--- Add deletion protection
|
||||||
|
-CREATE OR REPLACE TRIGGER deletion_protection__tgr
|
||||||
|
+DROP TRIGGER IF EXISTS deletion_protection__tgr on team;
|
||||||
|
+CREATE TRIGGER deletion_protection__tgr
|
||||||
|
CREATE OR REPLACE TRIGGER deletion_protection__tgr
|
||||||
|
BEFORE DELETE ON team FOR EACH STATEMENT
|
||||||
|
WHEN ((current_setting('rules.deletion_protection', true) IN ('on', '')) OR
|
65
tests.toml
65
tests.toml
|
@ -8,71 +8,8 @@ test_format = 1.0
|
||||||
# Tests to run
|
# Tests to run
|
||||||
# ------------
|
# ------------
|
||||||
|
|
||||||
# -------------------------------------------------------------------------------
|
|
||||||
# EVERYTHING PAST THIS POINT IS OPTIONAL AND MOST LIKELY UNNECESSARY FOR NEW APPS
|
|
||||||
#--------------------------------------------------------------------------------
|
|
||||||
## Conventions in this sample:
|
|
||||||
## <- An actual comment
|
|
||||||
# <- uncommenting this should be a valid entry in 'tests.toml'
|
|
||||||
|
|
||||||
## NB: the tests to run are automatically deduced by the CI script according to the
|
|
||||||
## content of the app's manifest. The declarations below allow to customize which
|
|
||||||
## tests are ran, possibly add special test suite to test special args, or
|
|
||||||
## declare which commits to test upgrade from.
|
|
||||||
##
|
|
||||||
## You can also decide (though this is discouraged!) to ban/ignore some tests,
|
|
||||||
## The test IDs to be used in only/exclude statements are:
|
|
||||||
## * install.root
|
|
||||||
## * install.subdir
|
|
||||||
## * install.nourl
|
|
||||||
## * install.multi
|
|
||||||
## * backup_restore
|
|
||||||
## * upgrade
|
|
||||||
## * upgrade.someCommitId
|
|
||||||
## * change_url
|
|
||||||
## NB: you should NOT need this except if you really have a good reason...
|
|
||||||
|
|
||||||
# exclude = ["install.private", "install.multi"]
|
|
||||||
|
|
||||||
## For special usecases, sometimes you need to setup other things on the machine
|
|
||||||
## prior to installing the app (such as installing another app)
|
|
||||||
## (Remove this key entirely if not needed)
|
|
||||||
|
|
||||||
# preinstall = """
|
|
||||||
# sudo yunohost app install foobar
|
|
||||||
# sudo yunohost user list
|
|
||||||
# """
|
|
||||||
|
|
||||||
# -------------------------------
|
|
||||||
# Default args to use for install
|
|
||||||
# -------------------------------
|
|
||||||
|
|
||||||
## By default, the CI will automagically fill the 'standard' args
|
|
||||||
## such as domain, path, admin, is_public and password with relevant values
|
|
||||||
## and also install args with a "default" provided in the manifest..
|
|
||||||
## It should only make sense to declare custom args here for args with no default values
|
|
||||||
## NB: you should NOT need those lines unless for custom questions with no obvious/default value
|
|
||||||
|
|
||||||
# args.language = "fr_FR"
|
|
||||||
# args.multisite = 0
|
|
||||||
|
|
||||||
# -------------------------------
|
# -------------------------------
|
||||||
# Commits to test upgrade from
|
# Commits to test upgrade from
|
||||||
# -------------------------------
|
# -------------------------------
|
||||||
|
|
||||||
## 00a1a6e7 is part of commit SHA, preferrably from 'master' branch
|
test_upgrade_from.0cc493d4.name = "Upgrade from 1.9.3~3"
|
||||||
## that points to valid install of previous version
|
|
||||||
|
|
||||||
# test_upgrade_from.00a1a6e7.name = "Upgrade from 5.4"
|
|
||||||
# test_upgrade_from.00a1a6e7.args.foo = "bar"
|
|
||||||
|
|
||||||
|
|
||||||
## This is an additional test suite
|
|
||||||
# [some_additional_testsuite]
|
|
||||||
|
|
||||||
## On additional tests suites, you can decide to run only specific tests
|
|
||||||
|
|
||||||
# only = ["install.subdir"]
|
|
||||||
|
|
||||||
# args.language = "en_GB"
|
|
||||||
# args.multisite = 1
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue