From ffc9aed794ae1732e145a94df8ceeddd67c886d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 12 Jul 2022 08:04:06 +0200 Subject: [PATCH 01/35] cleaning (#77) --- scripts/install | 6 +++--- scripts/upgrade | 6 ++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/scripts/install b/scripts/install index b31def0..4548150 100644 --- a/scripts/install +++ b/scripts/install @@ -100,6 +100,7 @@ ynh_setup_source --dest_dir=$final_path chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" +chmod +x $final_path/app.js #================================================= # NGINX CONFIGURATION @@ -118,8 +119,8 @@ ynh_script_progression --message="Building CodiMD... (this will take some time a pushd $final_path ynh_use_nodejs - ynh_exec_as $app env $ynh_node_load_PATH bin/setup - ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm run build + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH bin/setup + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm run build popd #================================================= @@ -132,7 +133,6 @@ ynh_add_config --template="../conf/.sequelizerc.example" --destination="$final_p chmod 600 $final_path/config.json chmod 600 $final_path/.sequelizerc -chmod +x $final_path/app.js #================================================= # SETUP SYSTEMD diff --git a/scripts/upgrade b/scripts/upgrade index 186b2b7..17b9905 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -136,8 +136,10 @@ then pushd "$final_path" ynh_use_nodejs - ynh_exec_warn_less bin/setup - ynh_exec_warn_less $ynh_npm run build + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH bin/setup + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm run build + #ynh_exec_warn_less ynh_exec_warn_less bin/setup + #ynh_exec_warn_less ynh_exec_warn_less $ynh_npm run build popd fi From f18ddd9ecea706e8d50020c94216d98f796bb0df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 12 Jul 2022 09:55:50 +0200 Subject: [PATCH 02/35] Update upgrade --- scripts/upgrade | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 17b9905..eb9c4c2 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -138,8 +138,6 @@ then ynh_use_nodejs ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH bin/setup ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm run build - #ynh_exec_warn_less ynh_exec_warn_less bin/setup - #ynh_exec_warn_less ynh_exec_warn_less $ynh_npm run build popd fi From 1a002311f439a468de9cc2eef8975992a5675789 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 6 Aug 2022 14:00:40 +0200 Subject: [PATCH 03/35] 2.4.2 (#79) * 2.4.2 * Auto-update README Co-authored-by: yunohost-bot --- README.md | 2 +- README_fr.md | 2 +- conf/app.src | 4 ++-- manifest.json | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index b001677..16b31b3 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ CodiMD is the free software version of HackMD, developed and opened source by th CodiMD is perfect for open communities, while HackMD emphasizes on permission and access controls for commercial use cases. -**Shipped version:** 2.4.1~ynh6 +**Shipped version:** 2.4.2~ynh1 ## Screenshots diff --git a/README_fr.md b/README_fr.md index 909a95f..8f9e5a2 100644 --- a/README_fr.md +++ b/README_fr.md @@ -19,7 +19,7 @@ CodiMD est la version logicielle libre de HackMD, développée et ouverte par l' CodiMD est parfait pour les communautés ouvertes, tandis que HackMD met l'accent sur les autorisations et les contrôles d'accès pour les cas d'utilisation commerciale. -**Version incluse :** 2.4.1~ynh6 +**Version incluse :** 2.4.2~ynh1 ## Captures d'écran diff --git a/conf/app.src b/conf/app.src index b97c2a9..d6d3cf0 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/hackmdio/codimd/archive/refs/tags/2.4.1.tar.gz -SOURCE_SUM=3bf516ca447aefc2c3ca9f94c76eeb1d1a14d4a0e24dca044b87ea89f1acdf73 +SOURCE_URL=https://github.com/hackmdio/codimd/archive/refs/tags/2.4.2.tar.gz +SOURCE_SUM=ba471b58ac0b3307544311eddc99afc27df8dbd07cd85bf2f4f9687e80cf0730 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index 17ffbb5..424cf31 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Collaborative editor to work on notes written in Markdown", "fr": "Éditeur collaboratif pour travailler sur des notes en Markdown" }, - "version": "2.4.1~ynh6", + "version": "2.4.2~ynh1", "url": "https://github.com/hackmdio/codimd", "upstream": { "license": "AGPL-3.0-only", From caad09a3cb676eb5d4ffc6cb4ae1f3fd49bbd16f Mon Sep 17 00:00:00 2001 From: YunoHost Bot Date: Sun, 7 Aug 2022 21:04:14 +0200 Subject: [PATCH 04/35] =?UTF-8?q?[autopatch]=20Add=20Common=20Platform?= =?UTF-8?q?=C2=A0Enumeration=20id=20to=20`manifest.json`=20(#81)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Testing (#80) * cleaning (#77) * Update upgrade * 2.4.2 (#79) * 2.4.2 * Auto-update README Co-authored-by: yunohost-bot Co-authored-by: yunohost-bot * [autopatch] Add Common Platform Enumeration id to `manifest.json` Co-authored-by: Éric Gaspar <46165813+ericgaspar@users.noreply.github.com> Co-authored-by: Yunohost-Bot <> --- manifest.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/manifest.json b/manifest.json index 424cf31..d68d954 100644 --- a/manifest.json +++ b/manifest.json @@ -13,7 +13,8 @@ "website": "https://hackmd.io/", "admindoc": "https://hackmd.io/c/codimd-documentation/%2Fs%2Fcodimd-documentation#Administration-Guides", "userdoc": "https://hackmd.io/c/codimd-documentation/%2Fs%2Fcodimd-documentation#User-Guides", - "code": "https://github.com/hackmdio/codimd" + "code": "https://github.com/hackmdio/codimd", + "cpe": "cpe:2.3:a:hackmd:codimd" }, "license": "AGPL-3.0-only", "maintainer": { @@ -27,7 +28,7 @@ "nginx" ], "arguments": { - "install" : [ + "install": [ { "name": "domain", "type": "domain" @@ -43,4 +44,4 @@ } ] } -} +} \ No newline at end of file From cd1a40601784040e87a045cdf3c6c1fc7c72656e Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 15 Aug 2022 19:05:35 +0200 Subject: [PATCH 05/35] set relative path for --keep opt --- scripts/upgrade | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index eb9c4c2..ae76dee 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -82,25 +82,8 @@ if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Upgrading source files..." --weight=16 - # Create a temporary directory - #tmpdir="$(mktemp -d)" - - # Backup the config file in the temp dir - #cp -a "$final_path/config.json" "$tmpdir/config.json" - #cp -a "$final_path/.sequelizerc" "$tmpdir/.sequelizerc" - - # Remove the app directory securely - #ynh_secure_remove --file=$final_path - # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir=$final_path --keep="$final_path/config.json $final_path/.sequelizerc" - - #Copy the admin saved settings from tmp directory to final path - #cp -a "$tmpdir/config.json" "$final_path/config.json" - #cp -a "$tmpdir/.sequelizerc" "$final_path/.sequelizerc" - - # Remove the tmp directory securely - #ynh_secure_remove --file="$tmpdir" + ynh_setup_source --dest_dir=$final_path --keep="config.json .sequelizerc" fi chmod 750 "$final_path" From bb6f5d6581e6b7e0ba64a74ff0a98d8c98480546 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Mon, 15 Aug 2022 17:05:43 +0000 Subject: [PATCH 06/35] Auto-update README --- README.md | 1 + README_fr.md | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 16b31b3..091b648 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,7 @@ CodiMD is perfect for open communities, while HackMD emphasizes on permission an **Shipped version:** 2.4.2~ynh1 + ## Screenshots ![Screenshot of CodiMD](./doc/screenshots/screenshot.png) diff --git a/README_fr.md b/README_fr.md index 8f9e5a2..bf11eb8 100644 --- a/README_fr.md +++ b/README_fr.md @@ -19,7 +19,8 @@ CodiMD est la version logicielle libre de HackMD, développée et ouverte par l' CodiMD est parfait pour les communautés ouvertes, tandis que HackMD met l'accent sur les autorisations et les contrôles d'accès pour les cas d'utilisation commerciale. -**Version incluse :** 2.4.2~ynh1 +**Version incluse :** 2.4.2~ynh1 + ## Captures d'écran From 5ec29f81fd7db593aa3c29acdf237f8b6de03e21 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 22 Oct 2022 09:25:01 +0200 Subject: [PATCH 07/35] Update install --- scripts/install | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/install b/scripts/install index 4548150..ac64594 100644 --- a/scripts/install +++ b/scripts/install @@ -34,6 +34,12 @@ app=$YNH_APP_INSTANCE_NAME #================================================= ynh_script_progression --message="Validating installation parameters..." --weight=1 +# Stop if architecture is ARM +case $YNH_ARCH in + arm*|armhf) ynh_die --message="Sorry, your architecture $YNH_ARCH is not supported by CodiMD. Aborting.";; + *) ;; +esac + final_path=/var/www/$app test ! -e "$final_path" || ynh_die --message="This path already contains a folder" From 78098d1ac6b1f76793872e96e6d9b6f62bb94151 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 22 Oct 2022 07:25:07 +0000 Subject: [PATCH 08/35] Auto-update README --- README.md | 1 - README_fr.md | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 091b648..16b31b3 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,6 @@ CodiMD is perfect for open communities, while HackMD emphasizes on permission an **Shipped version:** 2.4.2~ynh1 - ## Screenshots ![Screenshot of CodiMD](./doc/screenshots/screenshot.png) diff --git a/README_fr.md b/README_fr.md index bf11eb8..8f9e5a2 100644 --- a/README_fr.md +++ b/README_fr.md @@ -19,8 +19,7 @@ CodiMD est la version logicielle libre de HackMD, développée et ouverte par l' CodiMD est parfait pour les communautés ouvertes, tandis que HackMD met l'accent sur les autorisations et les contrôles d'accès pour les cas d'utilisation commerciale. -**Version incluse :** 2.4.2~ynh1 - +**Version incluse :** 2.4.2~ynh1 ## Captures d'écran From 276889a14eedf8026b4b07ba2df9f4a2a72dffa3 Mon Sep 17 00:00:00 2001 From: YunoHost Bot Date: Thu, 23 Feb 2023 23:47:29 +0100 Subject: [PATCH 09/35] Upgrade auto-updater (#84) * [autopatch] Upgrade auto-updater * Auto-update README --------- Co-authored-by: tituspijean --- .github/workflows/updater.yml | 4 ++-- README.md | 3 ++- README_fr.md | 21 +++++++++++---------- 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/.github/workflows/updater.yml b/.github/workflows/updater.yml index ca77fed..ac12a56 100644 --- a/.github/workflows/updater.yml +++ b/.github/workflows/updater.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Fetch the source code - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: token: ${{ secrets.GITHUB_TOKEN }} - name: Run the updater script @@ -33,7 +33,7 @@ jobs: - name: Create Pull Request id: cpr if: ${{ env.PROCEED == 'true' }} - uses: peter-evans/create-pull-request@v3 + uses: peter-evans/create-pull-request@v4 with: token: ${{ secrets.GITHUB_TOKEN }} commit-message: Update to version ${{ env.VERSION }} diff --git a/README.md b/README.md index 16b31b3..03c6b55 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,8 @@ It shall NOT be edited by hand. # CodiMD for YunoHost -[![Integration level](https://dash.yunohost.org/integration/codimd.svg)](https://dash.yunohost.org/appci/app/codimd) ![Working status](https://ci-apps.yunohost.org/ci/badges/codimd.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/codimd.maintain.svg) +[![Integration level](https://dash.yunohost.org/integration/codimd.svg)](https://dash.yunohost.org/appci/app/codimd) ![Working status](https://ci-apps.yunohost.org/ci/badges/codimd.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/codimd.maintain.svg) + [![Install CodiMD with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=codimd) *[Lire ce readme en français.](./README_fr.md)* diff --git a/README_fr.md b/README_fr.md index 8f9e5a2..317ed12 100644 --- a/README_fr.md +++ b/README_fr.md @@ -5,15 +5,16 @@ It shall NOT be edited by hand. # CodiMD pour YunoHost -[![Niveau d'intégration](https://dash.yunohost.org/integration/codimd.svg)](https://dash.yunohost.org/appci/app/codimd) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/codimd.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/codimd.maintain.svg) +[![Niveau d’intégration](https://dash.yunohost.org/integration/codimd.svg)](https://dash.yunohost.org/appci/app/codimd) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/codimd.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/codimd.maintain.svg) + [![Installer CodiMD avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=codimd) *[Read this readme in english.](./README.md)* -> *Ce package vous permet d'installer CodiMD rapidement et simplement sur un serveur YunoHost. -Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.* +> *Ce package vous permet d’installer CodiMD rapidement et simplement sur un serveur YunoHost. +Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l’installer et en profiter.* -## Vue d'ensemble +## Vue d’ensemble CodiMD est la version logicielle libre de HackMD, développée et ouverte par l'équipe HackMD avec des fonctionnalités réduites (sans mode livre), vous pouvez utiliser CodiMD pour votre communauté et posséder toutes vos données. [(Voir l'origine du nom CodiMD.)](https://github.com/hackmdio/codimd/issues/720) @@ -21,9 +22,9 @@ CodiMD est parfait pour les communautés ouvertes, tandis que HackMD met l'accen **Version incluse :** 2.4.2~ynh1 -## Captures d'écran +## Captures d’écran -![Capture d'écran de CodiMD](./doc/screenshots/screenshot.png) +![Capture d’écran de CodiMD](./doc/screenshots/screenshot.png) ## Avertissements / informations importantes @@ -38,10 +39,10 @@ Vous pouvez configurer CodiMD en éditant ce fichier `/var/www/codimd/config.jso ## Documentations et ressources -* Site officiel de l'app : +* Site officiel de l’app : * Documentation officielle utilisateur : -* Documentation officielle de l'admin : -* Dépôt de code officiel de l'app : +* Documentation officielle de l’admin : +* Dépôt de code officiel de l’app : * Documentation YunoHost pour cette app : * Signaler un bug : @@ -57,4 +58,4 @@ ou sudo yunohost app upgrade codimd -u https://github.com/YunoHost-Apps/codimd_ynh/tree/testing --debug ``` -**Plus d'infos sur le packaging d'applications :** +**Plus d’infos sur le packaging d’applications :** \ No newline at end of file From fac72775c9e64dceeb58843ecd2a8c7927dab79d Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 8 Apr 2023 09:36:12 +0200 Subject: [PATCH 10/35] Update manifest.json --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index d68d954..5fd1ba7 100644 --- a/manifest.json +++ b/manifest.json @@ -21,7 +21,7 @@ "name": "eric_G" }, "requirements": { - "yunohost": ">= 4.3.0" + "yunohost": ">= 11.1.17" }, "multi_instance": false, "services": [ From 0dddd792106108da9181ad4f05bbb37ec443d10e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 27 Apr 2023 11:08:37 +0200 Subject: [PATCH 11/35] v2 (#85) * v2 * v2 * Auto-update README --------- Co-authored-by: yunohost-bot --- .github/workflows/updater.sh | 126 -------------------------- .github/workflows/updater.yml | 48 ---------- README.md | 11 --- README_fr.md | 11 --- check_process | 25 ----- conf/app.src | 5 - conf/nginx.conf | 3 +- conf/systemd.service | 2 +- doc/{DISCLAIMER.md => ADMIN.md} | 7 -- doc/{DISCLAIMER_fr.md => ADMIN_fr.md} | 7 -- manifest.json | 47 ---------- manifest.toml | 59 ++++++++++++ scripts/_common.sh | 3 - scripts/backup | 25 +---- scripts/change_url | 76 +--------------- scripts/install | 121 +++---------------------- scripts/remove | 39 -------- scripts/restore | 53 +---------- scripts/upgrade | 68 +------------- tests.toml | 9 ++ 20 files changed, 94 insertions(+), 651 deletions(-) delete mode 100644 .github/workflows/updater.sh delete mode 100644 .github/workflows/updater.yml delete mode 100644 check_process delete mode 100644 conf/app.src rename doc/{DISCLAIMER.md => ADMIN.md} (58%) rename doc/{DISCLAIMER_fr.md => ADMIN_fr.md} (50%) delete mode 100644 manifest.json create mode 100644 manifest.toml create mode 100644 tests.toml diff --git a/.github/workflows/updater.sh b/.github/workflows/updater.sh deleted file mode 100644 index 1e2f8ef..0000000 --- a/.github/workflows/updater.sh +++ /dev/null @@ -1,126 +0,0 @@ -#!/bin/bash - -#================================================= -# PACKAGE UPDATING HELPER -#================================================= - -# This script is meant to be run by GitHub Actions -# The YunoHost-Apps organisation offers a template Action to run this script periodically -# Since each app is different, maintainers can adapt its contents so as to perform -# automatic actions when a new upstream release is detected. - -# Remove this exit command when you are ready to run this Action -#exit 1 - -#================================================= -# FETCHING LATEST RELEASE AND ITS ASSETS -#================================================= - -# Fetching information -current_version=$(cat manifest.json | jq -j '.version|split("~")[0]') -repo=$(cat manifest.json | jq -j '.upstream.code|split("https://github.com/")[1]') -# Some jq magic is needed, because the latest upstream release is not always the latest version (e.g. security patches for older versions) -version=$(curl --silent "https://api.github.com/repos/$repo/releases" | jq -r '.[] | select( .prerelease != true ) | .tag_name' | sort -V | tail -1) -assets=($(curl --silent "https://api.github.com/repos/$repo/releases" | jq -r '[ .[] | select(.tag_name=="'$version'").assets[].browser_download_url ] | join(" ") | @sh' | tr -d "'")) - -# if [[ ${version:0:1} == "v" || ${version:0:1} == "V" ]]; then -# version=${version:1} -# fi - -# Setting up the environment variables -echo "Current version: $current_version" -echo "Latest release from upstream: $version" -echo "VERSION=$version" >> $GITHUB_ENV -# For the time being, let's assume the script will fail -echo "PROCEED=false" >> $GITHUB_ENV - -# Proceed only if the retrieved version is greater than the current one -if ! dpkg --compare-versions "$current_version" "lt" "$version" ; then - echo "::warning ::No new version available" - exit 0 -# Proceed only if a PR for this new version does not already exist -elif git ls-remote -q --exit-code --heads https://github.com/$GITHUB_REPOSITORY.git ci-auto-update-v$version ; then - echo "::warning ::A branch already exists for this update" - exit 0 -fi - -# Each release can hold multiple assets (e.g. binaries for different architectures, source code, etc.) -echo "${#assets[@]} available asset(s)" - -#================================================= -# UPDATE SOURCE FILES -#================================================= - -# Here we use the $assets variable to get the resources published in the upstream release. -# Here is an example for Grav, it has to be adapted in accordance with how the upstream releases look like. - -# Let's loop over the array of assets URLs -for asset_url in ${assets[@]}; do - -echo "Handling asset at $asset_url" - -# Assign the asset to a source file in conf/ directory -# Here we base the source file name upon a unique keyword in the assets url (admin vs. update) -# Leave $src empty to ignore the asset -case $asset_url in - *".tar.gz"*) - src="app" - ;; -esac - -# If $src is not empty, let's process the asset -if [ ! -z "$src" ]; then - -# Create the temporary directory -tempdir="$(mktemp -d)" - -# Download sources and calculate checksum -filename=${asset_url##*/} -curl --silent -4 -L $asset_url -o "$tempdir/$filename" -checksum=$(sha256sum "$tempdir/$filename" | head -c 64) - -# Delete temporary directory -rm -rf $tempdir - -# Get extension -if [[ $filename == *.tar.gz ]]; then - extension=tar.gz -else - extension=${filename##*.} -fi - -# Rewrite source file -cat < conf/$src.src -SOURCE_URL=$asset_url -SOURCE_SUM=$checksum -SOURCE_SUM_PRG=sha256sum -SOURCE_FORMAT=$extension -SOURCE_IN_SUBDIR=true -EOT -echo "... conf/$src.src updated" - -else -echo "... asset ignored" -fi - -done - -#================================================= -# SPECIFIC UPDATE STEPS -#================================================= - -# Any action on the app's source code can be done. -# The GitHub Action workflow takes care of committing all changes after this script ends. - -#================================================= -# GENERIC FINALIZATION -#================================================= - -# Replace new version in manifest -echo "$(jq -s --indent 4 ".[] | .version = \"$version~ynh1\"" manifest.json)" > manifest.json - -# No need to update the README, yunohost-bot takes care of it - -# The Action will proceed only if the PROCEED environment variable is set to true -echo "PROCEED=true" >> $GITHUB_ENV -exit 0 diff --git a/.github/workflows/updater.yml b/.github/workflows/updater.yml deleted file mode 100644 index ac12a56..0000000 --- a/.github/workflows/updater.yml +++ /dev/null @@ -1,48 +0,0 @@ -# This workflow allows GitHub Actions to automagically update your app whenever a new upstream release is detected. -# You need to enable Actions in your repository settings, and fetch this Action from the YunoHost-Apps organization. -# This file should be enough by itself, but feel free to tune it to your needs. -# It calls updater.sh, which is where you should put the app-specific update steps. -name: Check for new upstream releases -on: - # Allow to manually trigger the workflow - workflow_dispatch: - # Run it every day at 6:00 UTC - schedule: - - cron: '0 6 * * *' -jobs: - updater: - runs-on: ubuntu-latest - steps: - - name: Fetch the source code - uses: actions/checkout@v3 - with: - token: ${{ secrets.GITHUB_TOKEN }} - - name: Run the updater script - id: run_updater - run: | - # Setting up Git user - git config --global user.name 'yunohost-bot' - git config --global user.email 'yunohost-bot@users.noreply.github.com' - # Run the updater script - /bin/bash .github/workflows/updater.sh - - name: Commit changes - id: commit - if: ${{ env.PROCEED == 'true' }} - run: | - git commit -am "Upgrade to v$VERSION" - - name: Create Pull Request - id: cpr - if: ${{ env.PROCEED == 'true' }} - uses: peter-evans/create-pull-request@v4 - with: - token: ${{ secrets.GITHUB_TOKEN }} - commit-message: Update to version ${{ env.VERSION }} - committer: 'yunohost-bot ' - author: 'yunohost-bot ' - signoff: false - branch: ci-auto-update-v${{ env.VERSION }} - delete-branch: true - title: 'Upgrade to version ${{ env.VERSION }}' - body: | - Upgrade to v${{ env.VERSION }} - draft: false diff --git a/README.md b/README.md index 03c6b55..c74b078 100644 --- a/README.md +++ b/README.md @@ -26,17 +26,6 @@ CodiMD is perfect for open communities, while HackMD emphasizes on permission an ![Screenshot of CodiMD](./doc/screenshots/screenshot.png) -## Disclaimers / important information - -### Multi-user support - -* Is LDAP supported? **Yes** -* Can the app be used by multiple users? **Yes** - -### Configuration - -You can configure CodiMD by editing this file `/var/www/codimd/config.json` using the [documentation](https://hackmd.io/c/codimd-documentation/%2Fs%2Fcodimd-configuration) - ## Documentation and resources * Official app website: diff --git a/README_fr.md b/README_fr.md index 317ed12..db82f11 100644 --- a/README_fr.md +++ b/README_fr.md @@ -26,17 +26,6 @@ CodiMD est parfait pour les communautés ouvertes, tandis que HackMD met l'accen ![Capture d’écran de CodiMD](./doc/screenshots/screenshot.png) -## Avertissements / informations importantes - -### Prise en charge multi-utilisateurs - -* LDAP est-il pris en charge ? **Oui** -* L'application peut-elle être utilisée par plusieurs utilisateurs ? **Oui** - -### Configuration - -Vous pouvez configurer CodiMD en éditant ce fichier `/var/www/codimd/config.json` en utilisant la [documentation](https://hakmd.io/c/codimd-documentation/%2Fs%2Fcodimd-configuration) - ## Documentations et ressources * Site officiel de l’app : diff --git a/check_process b/check_process deleted file mode 100644 index bc6846b..0000000 --- a/check_process +++ /dev/null @@ -1,25 +0,0 @@ -;; Test complet - ; Manifest - domain="domain.tld" - path="/path" - admin="john" - is_public=1 - ; Checks - pkg_linter=1 - setup_sub_dir=0 - setup_root=1 - setup_nourl=0 - setup_private=1 - setup_public=1 - upgrade=1 - upgrade=1 from_commit=0d58e34697338049d951c8373da3d363a121d439 - backup_restore=1 - multi_instance=0 - change_url=1 -;;; Options -Email= -Notification=none -;;; Upgrade options - ; commit=0d58e34697338049d951c8373da3d363a121d439 - name=Upgrade to version 2.4.1 - manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=pass&port=666& diff --git a/conf/app.src b/conf/app.src deleted file mode 100644 index d6d3cf0..0000000 --- a/conf/app.src +++ /dev/null @@ -1,5 +0,0 @@ -SOURCE_URL=https://github.com/hackmdio/codimd/archive/refs/tags/2.4.2.tar.gz -SOURCE_SUM=ba471b58ac0b3307544311eddc99afc27df8dbd07cd85bf2f4f9687e80cf0730 -SOURCE_SUM_PRG=sha256sum -SOURCE_FORMAT=tar.gz -SOURCE_IN_SUBDIR=true diff --git a/conf/nginx.conf b/conf/nginx.conf index c43334b..7f877ae 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,4 +1,5 @@ -location / { +#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; +location __PATH__/ { proxy_pass http://127.0.0.1:__PORT__/; proxy_redirect off; diff --git a/conf/systemd.service b/conf/systemd.service index f9f591f..fc5e6cc 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -7,7 +7,7 @@ After=network.target postgresql.service Type=simple User=__APP__ Group=__APP__ -WorkingDirectory=__FINALPATH__ +WorkingDirectory=__INSTALL_DIR__ Environment="NODE_ENV=production" Environment="__YNH_NODE_LOAD_PATH__" ExecStart=__YNH_NODE__ app.js diff --git a/doc/DISCLAIMER.md b/doc/ADMIN.md similarity index 58% rename from doc/DISCLAIMER.md rename to doc/ADMIN.md index 354496c..e974bf9 100644 --- a/doc/DISCLAIMER.md +++ b/doc/ADMIN.md @@ -1,8 +1 @@ -### Multi-user support - -* Is LDAP supported? **Yes** -* Can the app be used by multiple users? **Yes** - -### Configuration - You can configure CodiMD by editing this file `/var/www/codimd/config.json` using the [documentation](https://hackmd.io/c/codimd-documentation/%2Fs%2Fcodimd-configuration) diff --git a/doc/DISCLAIMER_fr.md b/doc/ADMIN_fr.md similarity index 50% rename from doc/DISCLAIMER_fr.md rename to doc/ADMIN_fr.md index 31f3321..0ac335e 100644 --- a/doc/DISCLAIMER_fr.md +++ b/doc/ADMIN_fr.md @@ -1,8 +1 @@ -### Prise en charge multi-utilisateurs - -* LDAP est-il pris en charge ? **Oui** -* L'application peut-elle être utilisée par plusieurs utilisateurs ? **Oui** - -### Configuration - Vous pouvez configurer CodiMD en éditant ce fichier `/var/www/codimd/config.json` en utilisant la [documentation](https://hakmd.io/c/codimd-documentation/%2Fs%2Fcodimd-configuration) diff --git a/manifest.json b/manifest.json deleted file mode 100644 index 5fd1ba7..0000000 --- a/manifest.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "CodiMD", - "id": "codimd", - "packaging_format": 1, - "description": { - "en": "Collaborative editor to work on notes written in Markdown", - "fr": "Éditeur collaboratif pour travailler sur des notes en Markdown" - }, - "version": "2.4.2~ynh1", - "url": "https://github.com/hackmdio/codimd", - "upstream": { - "license": "AGPL-3.0-only", - "website": "https://hackmd.io/", - "admindoc": "https://hackmd.io/c/codimd-documentation/%2Fs%2Fcodimd-documentation#Administration-Guides", - "userdoc": "https://hackmd.io/c/codimd-documentation/%2Fs%2Fcodimd-documentation#User-Guides", - "code": "https://github.com/hackmdio/codimd", - "cpe": "cpe:2.3:a:hackmd:codimd" - }, - "license": "AGPL-3.0-only", - "maintainer": { - "name": "eric_G" - }, - "requirements": { - "yunohost": ">= 11.1.17" - }, - "multi_instance": false, - "services": [ - "nginx" - ], - "arguments": { - "install": [ - { - "name": "domain", - "type": "domain" - }, - { - "name": "is_public", - "type": "boolean", - "help": { - "en": "If enabled, CodiMD will be accessible by people who do not have an account. This can be changed later via the webadmin.", - "fr": "Si cette case est cochée, CodiMD sera accessible aux personnes n’ayant pas de compte. Vous pourrez changer ceci plus tard via la webadmin." - }, - "default": true - } - ] - } -} \ No newline at end of file diff --git a/manifest.toml b/manifest.toml new file mode 100644 index 0000000..4ab60fe --- /dev/null +++ b/manifest.toml @@ -0,0 +1,59 @@ +packaging_format = 2 + +id = "codimd" +name = "CodiMD" +description.en = "Collaborative editor to work on notes written in Markdown" +description.fr = "Éditeur collaboratif pour travailler sur des notes en Markdown" + +version = "2.4.2~ynh1" + +maintainers = ["eric_G"] + +[upstream] +license = "AGPL-3.0-only" +website = "https://hackmd.io/" +admindoc = "https://hackmd.io/c/codimd-documentation/%2Fs%2Fcodimd-documentation#Administration-Guides" +userdoc = "https://hackmd.io/c/codimd-documentation/%2Fs%2Fcodimd-documentation#User-Guides" +code = "https://github.com/hackmdio/codimd" + +[integration] +yunohost = ">= 11.1.17" +architectures = ["amd64"] +multi_instance = false +ldap = true +sso = true +disk = "50M" +ram.build = "50M" +ram.runtime = "50M" + +[install] + [install.domain] + type = "domain" + full_domain = true + + [install.init_main_permission] + help.en = "If enabled, CodiMD will be accessible by people who do not have an account. This can be changed later via the webadmin." + help.fr = "Si cette case est cochée, CodiMD sera accessible aux personnes n’ayant pas de compte. Vous pourrez changer ceci plus tard via la webadmin." + type = "group" + default = "visitors" + +[resources] + [resources.sources.main] + url = "https://github.com/hackmdio/codimd/archive/refs/tags/2.4.2.tar.gz" + sha256 = "ba471b58ac0b3307544311eddc99afc27df8dbd07cd85bf2f4f9687e80cf0730" + autoupdate.strategy = "latest_github_tag" + + [resources.ports] + + [resources.system_user] + + [resources.install_dir] + + [resources.permissions] + main.url = "/" + + [resources.apt] + packages = "postgresql libssl-dev" + + [resources.database] + type = "postgresql" diff --git a/scripts/_common.sh b/scripts/_common.sh index 3d61bd4..ac79128 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,9 +4,6 @@ # COMMON VARIABLES #================================================= -# dependencies used by the app -pkg_dependencies="postgresql apt-transport-https libssl-dev" - nodejs_version=12 #================================================= diff --git a/scripts/backup b/scripts/backup index 77494ff..d487780 100644 --- a/scripts/backup +++ b/scripts/backup @@ -10,27 +10,6 @@ source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers -#================================================= -# MANAGE SCRIPT FAILURE -#================================================= - -ynh_clean_setup () { - ynh_clean_check_starting -} -# Exit if an error occurs during the execution of the script -ynh_abort_if_errors - -#================================================= -# LOAD SETTINGS -#================================================= -ynh_print_info --message="Loading installation settings..." - -app=$YNH_APP_INSTANCE_NAME - -final_path=$(ynh_app_setting_get --app=$app --key=final_path) -domain=$(ynh_app_setting_get --app=$app --key=domain) -db_name=$(ynh_app_setting_get --app=$app --key=db_name) - #================================================= # DECLARE DATA AND CONF FILES TO BACKUP #================================================= @@ -40,7 +19,7 @@ ynh_print_info --message="Declaring files to be backed up..." # BACKUP THE APP MAIN DIR #================================================= -ynh_backup --src_path="$final_path" +ynh_backup --src_path="$install_dir" #================================================= # BACKUP THE NGINX CONFIGURATION @@ -48,8 +27,6 @@ ynh_backup --src_path="$final_path" ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# SPECIFIC BACKUP #================================================= # BACKUP SYSTEMD #================================================= diff --git a/scripts/change_url b/scripts/change_url index fdedb7c..9e8049d 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -9,57 +9,6 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# RETRIEVE ARGUMENTS -#================================================= - -old_domain=$YNH_APP_OLD_DOMAIN -old_path=$YNH_APP_OLD_PATH - -new_domain=$YNH_APP_NEW_DOMAIN -path_url="/" - -app=$YNH_APP_INSTANCE_NAME - -#================================================= -# LOAD SETTINGS -#================================================= -ynh_script_progression --message="Loading installation settings..." --weight=1 - -# Needed for helper "ynh_add_nginx_config" -final_path=$(ynh_app_setting_get --app=$app --key=final_path) -port=$(ynh_app_setting_get --app=$app --key=port) -db_name=$(ynh_app_setting_get --app=$app --key=db_name) -db_user=$db_name -db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd) - -#================================================= -# BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP -#================================================= -ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." --weight=1 - -# Backup the current version of the app -ynh_backup_before_upgrade -ynh_clean_setup () { - # Remove the new domain config file, the remove script won't do it as it doesn't know yet its location. - ynh_secure_remove --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" - - # Restore it if the upgrade fails - ynh_restore_upgradebackup -} -# Exit if an error occurs during the execution of the script -ynh_abort_if_errors - -#================================================= -# CHECK WHICH PARTS SHOULD BE CHANGED -#================================================= - -change_domain=0 -if [ "$old_domain" != "$new_domain" ] -then - change_domain=1 -fi - #================================================= # STANDARD MODIFICATIONS #================================================= @@ -74,27 +23,15 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app #================================================= ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1 -nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf +ynh_change_url_nginx_config -# Change the domain for NGINX -if [ $change_domain -eq 1 ] -then - # Delete file checksum for the old conf file location - ynh_delete_file_checksum --file="$nginx_conf_path" - mv $nginx_conf_path /etc/nginx/conf.d/$new_domain.d/$app.conf - # Store file checksum for the new config file location - ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" -fi - -#================================================= -# SPECIFIC MODIFICATIONS #================================================= # CONFIGURE CODIMD #================================================= -path=${path_url:1} +path=${path:1} domain=new_domain -ynh_add_config --template="../conf/config.json.example" --destination="$final_path/config.json" +ynh_add_config --template="../conf/config.json.example" --destination="$install_dir/config.json" #================================================= # GENERIC FINALISATION @@ -106,13 +43,6 @@ ynh_script_progression --message="Starting a systemd service..." --weight=1 # Start a systemd service ynh_systemd_action --service_name=$app --action=start --log_path=systemd --line_match="HTTP Server listening" -#================================================= -# RELOAD NGINX -#================================================= -ynh_script_progression --message="Reloading NGINX web server..." --weight=1 - -ynh_systemd_action --service_name=nginx --action=reload - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/install b/scripts/install index ac64594..0545ad8 100644 --- a/scripts/install +++ b/scripts/install @@ -9,104 +9,25 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# MANAGE SCRIPT FAILURE -#================================================= - -ynh_clean_setup () { - ynh_clean_check_starting -} -# Exit if an error occurs during the execution of the script -ynh_abort_if_errors - -#================================================= -# RETRIEVE ARGUMENTS FROM THE MANIFEST -#================================================= - -domain=$YNH_APP_ARG_DOMAIN -path_url="/" -is_public=$YNH_APP_ARG_IS_PUBLIC - -app=$YNH_APP_INSTANCE_NAME - -#================================================= -# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS -#================================================= -ynh_script_progression --message="Validating installation parameters..." --weight=1 - -# Stop if architecture is ARM -case $YNH_ARCH in - arm*|armhf) ynh_die --message="Sorry, your architecture $YNH_ARCH is not supported by CodiMD. Aborting.";; - *) ;; -esac - -final_path=/var/www/$app -test ! -e "$final_path" || ynh_die --message="This path already contains a folder" - -# Register (book) web path -ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url - -#================================================= -# STORE SETTINGS FROM MANIFEST -#================================================= -ynh_script_progression --message="Storing installation settings..." --weight=2 - -ynh_app_setting_set --app=$app --key=domain --value=$domain -ynh_app_setting_set --app=$app --key=path --value=$path_url - -#================================================= -# STANDARD MODIFICATIONS -#================================================= -# FIND AND OPEN A PORT -#================================================= -ynh_script_progression --message="Finding an available port..." --weight=2 - -# Find an available port -port=$(ynh_find_port --port=3000) -ynh_app_setting_set --app=$app --key=port --value=$port - #================================================= # INSTALL DEPENDENCIES #================================================= ynh_script_progression --message="Installing dependencies..." --weight=20 -ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies - # Install Nodejs ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version -#================================================= -# CREATE DEDICATED USER -#================================================= -ynh_script_progression --message="Configuring system user..." --weight=2 - -# Create a system user -ynh_system_user_create --username=$app --home_dir="$final_path" - -#================================================= -# CREATE A POSTGRESQL DATABASE -#================================================= -ynh_script_progression --message="Creating a PostgreSQL database..." --weight=2 - -db_name=$(ynh_sanitize_dbid --db_name=$app) -db_user=$db_name -ynh_app_setting_set --app=$app --key=db_name --value=$db_name -ynh_psql_test_if_first_run -ynh_psql_setup_db --db_user=$db_user --db_name=$db_name - #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= ynh_script_progression --message="Setting up source files..." --weight=2 -ynh_app_setting_set --app=$app --key=final_path --value=$final_path # Download, check integrity, uncompress and patch the source from app.src -ynh_setup_source --dest_dir=$final_path +ynh_setup_source --dest_dir=$install_dir -chmod 750 "$final_path" -chmod -R o-rwx "$final_path" -chown -R $app:www-data "$final_path" -chmod +x $final_path/app.js +chmod -R o-rwx "$install_dir" +chown -R $app:www-data "$install_dir" +chmod +x $install_dir/app.js #================================================= # NGINX CONFIGURATION @@ -118,12 +39,12 @@ ynh_add_nginx_config #================================================= # SPECIFIC SETUP -#============================================== +#================================================= # INSTALL CODIMD -#============================================== +#================================================= ynh_script_progression --message="Building CodiMD... (this will take some time and resources!)" --weight=24 -pushd $final_path +pushd $install_dir ynh_use_nodejs ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH bin/setup ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm run build @@ -134,11 +55,11 @@ popd #================================================= ynh_script_progression --message="Modifying a config file..." --weight=1 -ynh_add_config --template="../conf/config.json.example" --destination="$final_path/config.json" -ynh_add_config --template="../conf/.sequelizerc.example" --destination="$final_path/.sequelizerc" +ynh_add_config --template="../conf/config.json.example" --destination="$install_dir/config.json" +ynh_add_config --template="../conf/.sequelizerc.example" --destination="$install_dir/.sequelizerc" -chmod 600 $final_path/config.json -chmod 600 $final_path/.sequelizerc +chmod 600 $install_dir/config.json +chmod 600 $install_dir/.sequelizerc #================================================= # SETUP SYSTEMD @@ -163,26 +84,6 @@ ynh_script_progression --message="Starting a systemd service..." --weight=2 # Start a systemd service ynh_systemd_action --service_name=$app --action=start --log_path=systemd --line_match="HTTP Server listening" -#================================================= -# SETUP SSOWAT -#================================================= -ynh_script_progression --message="Configuring permissions..." --weight=1 - -# Make app public if necessary -if [ $is_public -eq 1 ] -then - # Everyone can access the app. - # The "main" permission is automatically created before the install script. - ynh_permission_update --permission="main" --add="visitors" -fi - -#================================================= -# RELOAD NGINX -#================================================= -ynh_script_progression --message="Reloading NGINX web server..." --weight=2 - -ynh_systemd_action --service_name=nginx --action=reload - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/remove b/scripts/remove index 52d4f14..a814340 100644 --- a/scripts/remove +++ b/scripts/remove @@ -9,18 +9,6 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# LOAD SETTINGS -#================================================= -ynh_script_progression --message="Loading installation settings..." --weight=1 - -app=$YNH_APP_INSTANCE_NAME - -domain=$(ynh_app_setting_get --app=$app --key=domain) -db_name=$(ynh_app_setting_get --app=$app --key=db_name) -db_user=$db_name -final_path=$(ynh_app_setting_get --app=$app --key=final_path) - #================================================= # STANDARD REMOVE #================================================= @@ -42,22 +30,6 @@ ynh_script_progression --message="Stopping and removing the systemd service..." # Remove the dedicated systemd config ynh_remove_systemd_config -#================================================= -# REMOVE THE POSTGRESQL DATABASE -#================================================= -ynh_script_progression --message="Removing the PostgreSQL database..." --weight=2 - -# Remove a database if it exists, along with the associated user -ynh_psql_remove_db --db_user=$db_user --db_name=$db_name - -#================================================= -# REMOVE APP MAIN DIR -#================================================= -ynh_script_progression --message="Removing app main directory..." --weight=6 - -# Remove the app directory securely -ynh_secure_remove --file="$final_path" - #================================================= # REMOVE NGINX CONFIGURATION #================================================= @@ -72,19 +44,8 @@ ynh_remove_nginx_config ynh_script_progression --message="Removing dependencies..." --weight=1 # Remove metapackage and its dependencies -ynh_remove_app_dependencies ynh_remove_nodejs -#================================================= -# GENERIC FINALIZATION -#================================================= -# REMOVE DEDICATED USER -#================================================= -ynh_script_progression --message="Removing the dedicated system user..." --weight=1 - -# Delete a system user -ynh_system_user_delete --username=$app - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/restore b/scripts/restore index 81ce72d..e0dcdda 100644 --- a/scripts/restore +++ b/scripts/restore @@ -10,38 +10,6 @@ source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers -#================================================= -# MANAGE SCRIPT FAILURE -#================================================= - -ynh_clean_setup () { - ynh_clean_check_starting -} -# Exit if an error occurs during the execution of the script -ynh_abort_if_errors - -#================================================= -# LOAD SETTINGS -#================================================= -ynh_script_progression --message="Loading settings..." --weight=1 - -app=$YNH_APP_INSTANCE_NAME - -domain=$(ynh_app_setting_get --app=$app --key=domain) -path_url=$(ynh_app_setting_get --app=$app --key=path) -final_path=$(ynh_app_setting_get --app=$app --key=final_path) -db_name=$(ynh_app_setting_get --app=$app --key=db_name) -db_user=$db_name -db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd) - -#================================================= -# CHECK IF THE APP CAN BE RESTORED -#================================================= -ynh_script_progression --message="Validating restoration parameters..." --weight=2 - -test ! -d $final_path \ - || ynh_die --message="There is already a directory: $final_path " - #================================================= # STANDARD RESTORATION STEPS #================================================= @@ -51,24 +19,16 @@ ynh_script_progression --message="Restoring the NGINX configuration..." ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# RECREATE THE DEDICATED USER -#================================================= -ynh_script_progression --message="Recreating the dedicated system user..." --weight=1 - -# Create the dedicated user (if not existing) -ynh_system_user_create --username=$app --home_dir="$final_path" - #================================================= # RESTORE THE APP MAIN DIR #================================================= ynh_script_progression --message="Restoring the app main directory..." --weight=60 -ynh_restore_file --origin_path="$final_path" +ynh_restore_file --origin_path="$install_dir" -chmod 750 "$final_path" -chmod -R o-rwx "$final_path" -chown -R $app:www-data "$final_path" + +chmod -R o-rwx "$install_dir" +chown -R $app:www-data "$install_dir" #================================================= # SPECIFIC RESTORATION @@ -77,9 +37,6 @@ chown -R $app:www-data "$final_path" #================================================= ynh_script_progression --message="Reinstalling dependencies..." --weight=7 -# Define and install dependencies -ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies - # Install Nodejs ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version @@ -88,8 +45,6 @@ ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version #================================================= ynh_script_progression --message="Restoring the PostgreSQL database..." --weight=6 -ynh_psql_test_if_first_run -ynh_psql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd ynh_psql_execute_file_as_root --file="./db.sql" --database=$db_name #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index ae76dee..cd36635 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -9,42 +9,12 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# LOAD SETTINGS -#================================================= -ynh_script_progression --message="Loading installation settings..." --weight=2 - -app=$YNH_APP_INSTANCE_NAME - -domain=$(ynh_app_setting_get --app=$app --key=domain) -path_url=$(ynh_app_setting_get --app=$app --key=path) -final_path=$(ynh_app_setting_get --app=$app --key=final_path) -port=$(ynh_app_setting_get --app=$app --key=port) -db_name=$(ynh_app_setting_get --app=$app --key=db_name) -db_user=$db_name -db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd) - #================================================= # CHECK VERSION #================================================= -ynh_script_progression --message="Checking version..." upgrade_type=$(ynh_check_app_version_changed) -#================================================= -# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP -#================================================= -ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=20 - -# Backup the current version of the app -ynh_backup_before_upgrade -ynh_clean_setup () { - # Restore it if the upgrade fails - ynh_restore_upgradebackup -} -# Exit if an error occurs during the execution of the script -ynh_abort_if_errors - #================================================= # STANDARD UPGRADE STEPS #================================================= @@ -54,26 +24,6 @@ ynh_script_progression --message="Stopping a systemd service..." --weight=1 ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" -#================================================= -# ENSURE DOWNWARD COMPATIBILITY -#================================================= -ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 - -# Cleaning legacy permissions -if ynh_legacy_permissions_exists; then - ynh_legacy_permissions_delete_all - - ynh_app_setting_delete --app=$app --key=is_public -fi - -#================================================= -# CREATE DEDICATED USER -#================================================= -ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1 - -# Create a dedicated user (if not existing) -ynh_system_user_create --username=$app --home_dir="$final_path" - #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -83,12 +33,11 @@ then ynh_script_progression --message="Upgrading source files..." --weight=16 # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir=$final_path --keep="config.json .sequelizerc" + ynh_setup_source --dest_dir=$install_dir --keep="config.json .sequelizerc" fi -chmod 750 "$final_path" -chmod -R o-rwx "$final_path" -chown -R $app:www-data "$final_path" +chmod -R o-rwx "$install_dir" +chown -R $app:www-data "$install_dir" #================================================= # NGINX CONFIGURATION @@ -103,8 +52,6 @@ ynh_add_nginx_config #================================================= ynh_script_progression --message="Upgrading dependencies..." --weight=18 -ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies - # Install Nodejs ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version @@ -117,7 +64,7 @@ if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Building CodiMD... (this will take some time and resources!)" --weight=16 - pushd "$final_path" + pushd "$install_dir" ynh_use_nodejs ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH bin/setup ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm run build @@ -146,13 +93,6 @@ ynh_script_progression --message="Starting a systemd service..." --weight=1 ynh_systemd_action --service_name=$app --action=start --log_path=systemd --line_match="HTTP Server listening" -#================================================= -# RELOAD NGINX -#================================================= -ynh_script_progression --message="Reloading NGINX web server..." --weight=1 - -ynh_systemd_action --service_name=nginx --action=reload - #================================================= # END OF SCRIPT #================================================= diff --git a/tests.toml b/tests.toml new file mode 100644 index 0000000..20edff8 --- /dev/null +++ b/tests.toml @@ -0,0 +1,9 @@ +test_format = 1.0 + +[default] + + # ------------------------------- + # Commits to test upgrade from + # ------------------------------- + + test_upgrade_from.0d58e34697338049d951c8373da3d363a121d439.name = "Upgrade from 2.4.1" \ No newline at end of file From 0d7b456a617f068fd03b19875fa452fd0e5afeb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 27 Apr 2023 18:37:03 +0200 Subject: [PATCH 12/35] Update manifest.toml --- manifest.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest.toml b/manifest.toml index 4ab60fe..437a208 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "CodiMD" description.en = "Collaborative editor to work on notes written in Markdown" description.fr = "Éditeur collaboratif pour travailler sur des notes en Markdown" -version = "2.4.2~ynh1" +version = "2.4.2~ynh2" maintainers = ["eric_G"] @@ -17,7 +17,7 @@ userdoc = "https://hackmd.io/c/codimd-documentation/%2Fs%2Fcodimd-documentation# code = "https://github.com/hackmdio/codimd" [integration] -yunohost = ">= 11.1.17" +yunohost = ">= 11.1.18" architectures = ["amd64"] multi_instance = false ldap = true From 5f25536e0851fc25bd39495f3fe76e0043ea11a2 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Thu, 27 Apr 2023 16:37:08 +0000 Subject: [PATCH 13/35] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c74b078..74655e7 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ CodiMD is the free software version of HackMD, developed and opened source by th CodiMD is perfect for open communities, while HackMD emphasizes on permission and access controls for commercial use cases. -**Shipped version:** 2.4.2~ynh1 +**Shipped version:** 2.4.2~ynh2 ## Screenshots diff --git a/README_fr.md b/README_fr.md index db82f11..b54f073 100644 --- a/README_fr.md +++ b/README_fr.md @@ -20,7 +20,7 @@ CodiMD est la version logicielle libre de HackMD, développée et ouverte par l' CodiMD est parfait pour les communautés ouvertes, tandis que HackMD met l'accent sur les autorisations et les contrôles d'accès pour les cas d'utilisation commerciale. -**Version incluse :** 2.4.2~ynh1 +**Version incluse :** 2.4.2~ynh2 ## Captures d’écran From 3792f76188f659af97a68be5c327781180c7f010 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 13 May 2023 08:16:23 +0200 Subject: [PATCH 14/35] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 437a208..bc2f599 100644 --- a/manifest.toml +++ b/manifest.toml @@ -17,7 +17,7 @@ userdoc = "https://hackmd.io/c/codimd-documentation/%2Fs%2Fcodimd-documentation# code = "https://github.com/hackmdio/codimd" [integration] -yunohost = ">= 11.1.18" +yunohost = ">= 11.1.19" architectures = ["amd64"] multi_instance = false ldap = true From 19e4678418867a00058daae8a5a263f89239e432 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 18 Aug 2023 11:27:18 +0200 Subject: [PATCH 15/35] Update manifest.toml --- manifest.toml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/manifest.toml b/manifest.toml index bc2f599..10fc69e 100644 --- a/manifest.toml +++ b/manifest.toml @@ -17,7 +17,7 @@ userdoc = "https://hackmd.io/c/codimd-documentation/%2Fs%2Fcodimd-documentation# code = "https://github.com/hackmdio/codimd" [integration] -yunohost = ">= 11.1.19" +yunohost = ">= 11.2" architectures = ["amd64"] multi_instance = false ldap = true @@ -29,7 +29,6 @@ ram.runtime = "50M" [install] [install.domain] type = "domain" - full_domain = true [install.init_main_permission] help.en = "If enabled, CodiMD will be accessible by people who do not have an account. This can be changed later via the webadmin." From 5712f1f894d24f73ffc037565978a7c6310d5e43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 12 Sep 2023 12:52:46 +0200 Subject: [PATCH 16/35] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 10fc69e..d581bee 100644 --- a/manifest.toml +++ b/manifest.toml @@ -52,7 +52,7 @@ ram.runtime = "50M" main.url = "/" [resources.apt] - packages = "postgresql libssl-dev" + packages = "postgresql, libssl-dev" [resources.database] type = "postgresql" From 7d013d2f547b3ac80a489acaf3afe79482e1cf7e Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sun, 24 Dec 2023 13:31:26 +0000 Subject: [PATCH 17/35] Auto-update README --- README_fr.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README_fr.md b/README_fr.md index b54f073..7938e4e 100644 --- a/README_fr.md +++ b/README_fr.md @@ -32,7 +32,7 @@ CodiMD est parfait pour les communautés ouvertes, tandis que HackMD met l'accen * Documentation officielle utilisateur : * Documentation officielle de l’admin : * Dépôt de code officiel de l’app : -* Documentation YunoHost pour cette app : +* YunoHost Store: * Signaler un bug : ## Informations pour les développeurs From 82626e0329542bfb10a3a6ec21ad3b699147e5be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 24 Dec 2023 14:35:56 +0100 Subject: [PATCH 18/35] Update _common.sh --- scripts/_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index ac79128..b818f0f 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,7 +4,7 @@ # COMMON VARIABLES #================================================= -nodejs_version=12 +nodejs_version=16 #================================================= # PERSONAL HELPERS From 32e810658f24439db0553bb9e4e78964697c6a3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 24 Dec 2023 14:39:50 +0100 Subject: [PATCH 19/35] cleaning --- doc/ADMIN.md | 2 +- doc/ADMIN_fr.md | 2 +- manifest.toml | 2 +- scripts/change_url | 2 +- scripts/install | 43 +++++++++++++++---------------------------- scripts/remove | 20 +------------------- scripts/restore | 32 +++++--------------------------- 7 files changed, 25 insertions(+), 78 deletions(-) diff --git a/doc/ADMIN.md b/doc/ADMIN.md index e974bf9..9722dc3 100644 --- a/doc/ADMIN.md +++ b/doc/ADMIN.md @@ -1 +1 @@ -You can configure CodiMD by editing this file `/var/www/codimd/config.json` using the [documentation](https://hackmd.io/c/codimd-documentation/%2Fs%2Fcodimd-configuration) +You can configure CodiMD by editing this file `__INSTALL_DIR__/config.json` using the [documentation](https://hackmd.io/c/codimd-documentation/%2Fs%2Fcodimd-configuration) diff --git a/doc/ADMIN_fr.md b/doc/ADMIN_fr.md index 0ac335e..1b2cf9d 100644 --- a/doc/ADMIN_fr.md +++ b/doc/ADMIN_fr.md @@ -1 +1 @@ -Vous pouvez configurer CodiMD en éditant ce fichier `/var/www/codimd/config.json` en utilisant la [documentation](https://hakmd.io/c/codimd-documentation/%2Fs%2Fcodimd-configuration) +Vous pouvez configurer CodiMD en éditant ce fichier `__INSTALL_DIR__/config.json` en utilisant la [documentation](https://hakmd.io/c/codimd-documentation/%2Fs%2Fcodimd-configuration) diff --git a/manifest.toml b/manifest.toml index 66b217b..bfa721f 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "CodiMD" description.en = "Collaborative editor to work on notes written in Markdown" description.fr = "Éditeur collaboratif pour travailler sur des notes en Markdown" -version = "2.4.2~ynh2" +version = "2.4.2~ynh3" maintainers = ["eric_G"] diff --git a/scripts/change_url b/scripts/change_url index 9e8049d..4922e49 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -31,7 +31,7 @@ ynh_change_url_nginx_config path=${path:1} domain=new_domain -ynh_add_config --template="../conf/config.json.example" --destination="$install_dir/config.json" +ynh_add_config --template="config.json.example" --destination="$install_dir/config.json" #================================================= # GENERIC FINALISATION diff --git a/scripts/install b/scripts/install index 0545ad8..513b473 100644 --- a/scripts/install +++ b/scripts/install @@ -22,7 +22,6 @@ ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version #================================================= ynh_script_progression --message="Setting up source files..." --weight=2 -# Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir=$install_dir chmod -R o-rwx "$install_dir" @@ -34,9 +33,23 @@ chmod +x $install_dir/app.js #================================================= ynh_script_progression --message="Configuring NGINX web server..." --weight=2 -# Create a dedicated NGINX config ynh_add_nginx_config +ynh_add_systemd_config + +yunohost service add $app --description="Collaborative Markdown notes" --log="/var/log/$app/$app.log" + +#================================================= +# ADD A CONFIGURATION +#================================================= +ynh_script_progression --message="Modifying a config file..." --weight=1 + +ynh_add_config --template="config.json.example" --destination="$install_dir/config.json" +ynh_add_config --template=".sequelizerc.example" --destination="$install_dir/.sequelizerc" + +chmod 600 $install_dir/config.json +chmod 600 $install_dir/.sequelizerc + #================================================= # SPECIFIC SETUP #================================================= @@ -50,32 +63,6 @@ pushd $install_dir ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm run build popd -#================================================= -# ADD A CONFIGURATION -#================================================= -ynh_script_progression --message="Modifying a config file..." --weight=1 - -ynh_add_config --template="../conf/config.json.example" --destination="$install_dir/config.json" -ynh_add_config --template="../conf/.sequelizerc.example" --destination="$install_dir/.sequelizerc" - -chmod 600 $install_dir/config.json -chmod 600 $install_dir/.sequelizerc - -#================================================= -# SETUP SYSTEMD -#================================================= -ynh_script_progression --message="Configuring a systemd service..." --weight=1 - -# Create a dedicated systemd config -ynh_add_systemd_config - -#================================================= -# INTEGRATE SERVICE IN YUNOHOST -#================================================= -ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 - -yunohost service add $app --description="Collaborative Markdown notes" --log="/var/log/$app/$app.log" - #================================================= # START SYSTEMD SERVICE #================================================= diff --git a/scripts/remove b/scripts/remove index a814340..64802ec 100644 --- a/scripts/remove +++ b/scripts/remove @@ -14,36 +14,18 @@ source /usr/share/yunohost/helpers #================================================= # REMOVE SERVICE INTEGRATION IN YUNOHOST #================================================= +ynh_script_progression --message="Removing system configurations related to $app..." --weight=1 -# Remove the service from the list of services known by YunoHost (added from `yunohost service add`) if ynh_exec_warn_less yunohost service status $app >/dev/null then ynh_script_progression --message="Removing $app service..." --weight=1 yunohost service remove $app fi -#================================================= -# STOP AND REMOVE SERVICE -#================================================= -ynh_script_progression --message="Stopping and removing the systemd service..." --weight=1 - -# Remove the dedicated systemd config ynh_remove_systemd_config -#================================================= -# REMOVE NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Removing NGINX web server configuration..." --weight=5 - -# Remove the dedicated NGINX config ynh_remove_nginx_config -#================================================= -# REMOVE DEPENDENCIES -#================================================= -ynh_script_progression --message="Removing dependencies..." --weight=1 - -# Remove metapackage and its dependencies ynh_remove_nodejs #================================================= diff --git a/scripts/restore b/scripts/restore index e0dcdda..d3361ec 100644 --- a/scripts/restore +++ b/scripts/restore @@ -6,19 +6,9 @@ # IMPORT GENERIC HELPERS #================================================= -# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers -#================================================= -# STANDARD RESTORATION STEPS -#================================================= -# RESTORE THE NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Restoring the NGINX configuration..." - -ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" - #================================================= # RESTORE THE APP MAIN DIR #================================================= @@ -26,7 +16,6 @@ ynh_script_progression --message="Restoring the app main directory..." --weight= ynh_restore_file --origin_path="$install_dir" - chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" @@ -37,7 +26,6 @@ chown -R $app:www-data "$install_dir" #================================================= ynh_script_progression --message="Reinstalling dependencies..." --weight=7 -# Install Nodejs ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version #================================================= @@ -45,37 +33,27 @@ ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version #================================================= ynh_script_progression --message="Restoring the PostgreSQL database..." --weight=6 -ynh_psql_execute_file_as_root --file="./db.sql" --database=$db_name +ynh_psql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql #================================================= # RESTORE SYSTEMD #================================================= -ynh_script_progression --message="Restoring the systemd configuration..." --weight=5 +ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1 + +ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_restore_file --origin_path="/etc/systemd/system/$app.service" systemctl enable $app.service --quiet -#================================================= -# INTEGRATE SERVICE IN YUNOHOST -#================================================= -ynh_script_progression --message="Integrating service in YunoHost..." - yunohost service add $app --description="Collaborative Markdown notes" --log="/var/log/$app/$app.log" #================================================= # START SYSTEMD SERVICE #================================================= -ynh_script_progression --message="Starting a systemd service..." --weight=1 +ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1 ynh_systemd_action --service_name=$app --action=start --log_path=systemd --line_match="HTTP Server listening" -#================================================= -# GENERIC FINALIZATION -#================================================= -# RELOAD NGINX -#================================================= -ynh_script_progression --message="Reloading NGINX web server..." --weight=1 - ynh_systemd_action --service_name=nginx --action=reload #================================================= From ed679a25455ff7e49cd49743a257b8c8f03d4400 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sun, 24 Dec 2023 13:39:55 +0000 Subject: [PATCH 20/35] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6a69d3b..671bb8b 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ CodiMD is the free software version of HackMD, developed and opened source by th CodiMD is perfect for open communities, while HackMD emphasizes on permission and access controls for commercial use cases. -**Shipped version:** 2.4.2~ynh2 +**Shipped version:** 2.4.2~ynh3 ## Screenshots diff --git a/README_fr.md b/README_fr.md index 7938e4e..1ad9974 100644 --- a/README_fr.md +++ b/README_fr.md @@ -20,7 +20,7 @@ CodiMD est la version logicielle libre de HackMD, développée et ouverte par l' CodiMD est parfait pour les communautés ouvertes, tandis que HackMD met l'accent sur les autorisations et les contrôles d'accès pour les cas d'utilisation commerciale. -**Version incluse :** 2.4.2~ynh2 +**Version incluse :** 2.4.2~ynh3 ## Captures d’écran From c55f41dee85e8f217913a90cd9844748c1c11689 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 24 Dec 2023 16:15:24 +0100 Subject: [PATCH 21/35] Update _common.sh --- scripts/_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index b818f0f..ac79128 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,7 +4,7 @@ # COMMON VARIABLES #================================================= -nodejs_version=16 +nodejs_version=12 #================================================= # PERSONAL HELPERS From 514c611d49801e4eceb5fd40eb6511213e4673ce Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 26 Dec 2023 11:25:30 +0100 Subject: [PATCH 22/35] fix --- manifest.toml | 6 +++--- scripts/_common.sh | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/manifest.toml b/manifest.toml index bfa721f..d10f4cb 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "CodiMD" description.en = "Collaborative editor to work on notes written in Markdown" description.fr = "Éditeur collaboratif pour travailler sur des notes en Markdown" -version = "2.4.2~ynh3" +version = "2.5.0~ynh1" maintainers = ["eric_G"] @@ -41,8 +41,8 @@ ram.runtime = "50M" [resources] [resources.sources.main] - url = "https://github.com/hackmdio/codimd/archive/refs/tags/2.4.2.tar.gz" - sha256 = "ba471b58ac0b3307544311eddc99afc27df8dbd07cd85bf2f4f9687e80cf0730" + url = "https://github.com/hackmdio/codimd/archive/refs/tags/2.5.0.tar.gz" + sha256 = "cc20033fdeabddbe7c0305864c8b46d0b7c691986150b45278cdd785358e2598" autoupdate.strategy = "latest_github_tag" [resources.ports] diff --git a/scripts/_common.sh b/scripts/_common.sh index ac79128..9195d57 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,7 +4,7 @@ # COMMON VARIABLES #================================================= -nodejs_version=12 +nodejs_version=18 #================================================= # PERSONAL HELPERS From 59758534b924da563f0224364d6d134a2dc05ed8 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 26 Dec 2023 10:25:35 +0000 Subject: [PATCH 23/35] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 671bb8b..9b3f78d 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ CodiMD is the free software version of HackMD, developed and opened source by th CodiMD is perfect for open communities, while HackMD emphasizes on permission and access controls for commercial use cases. -**Shipped version:** 2.4.2~ynh3 +**Shipped version:** 2.5.0~ynh1 ## Screenshots diff --git a/README_fr.md b/README_fr.md index 1ad9974..227ff39 100644 --- a/README_fr.md +++ b/README_fr.md @@ -20,7 +20,7 @@ CodiMD est la version logicielle libre de HackMD, développée et ouverte par l' CodiMD est parfait pour les communautés ouvertes, tandis que HackMD met l'accent sur les autorisations et les contrôles d'accès pour les cas d'utilisation commerciale. -**Version incluse :** 2.4.2~ynh3 +**Version incluse :** 2.5.0~ynh1 ## Captures d’écran From 818f97627f01fb536c351240c0d63f1243b073b4 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 26 Dec 2023 11:26:25 +0100 Subject: [PATCH 24/35] Update _common.sh --- scripts/_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 9195d57..b818f0f 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,7 +4,7 @@ # COMMON VARIABLES #================================================= -nodejs_version=18 +nodejs_version=16 #================================================= # PERSONAL HELPERS From 8074cc0d5083e4d042da4100b764d5924b5919e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 26 Dec 2023 13:03:54 +0100 Subject: [PATCH 25/35] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index bfa721f..213932d 100644 --- a/manifest.toml +++ b/manifest.toml @@ -26,7 +26,7 @@ ldap = true sso = true disk = "50M" -ram.build = "50M" +ram.build = "4G" ram.runtime = "50M" [install] From e8dd539ffc9fde15e921f95ea746ac965e9616ca Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 3 Jan 2024 08:43:21 +0100 Subject: [PATCH 26/35] Update manifest.toml --- manifest.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index f889545..a108771 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "CodiMD" description.en = "Collaborative editor to work on notes written in Markdown" description.fr = "Éditeur collaboratif pour travailler sur des notes en Markdown" -version = "2.5.0~ynh1" +version = "2.5.1~ynh1" maintainers = ["eric_G"] @@ -41,8 +41,8 @@ ram.runtime = "50M" [resources] [resources.sources.main] - url = "https://github.com/hackmdio/codimd/archive/refs/tags/2.5.0.tar.gz" - sha256 = "cc20033fdeabddbe7c0305864c8b46d0b7c691986150b45278cdd785358e2598" + url = "https://github.com/hackmdio/codimd/archive/refs/tags/2.5.1.tar.gz" + sha256 = "667f51ef17f57cdf097d295d27e5866d74b67b25cdd25c9c9b0a9cc13c73f21d" autoupdate.strategy = "latest_github_tag" [resources.ports] From 88d77a69ef90e1312a047cbe05408fc943286a98 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Wed, 3 Jan 2024 07:43:27 +0000 Subject: [PATCH 27/35] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9b3f78d..20076b0 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ CodiMD is the free software version of HackMD, developed and opened source by th CodiMD is perfect for open communities, while HackMD emphasizes on permission and access controls for commercial use cases. -**Shipped version:** 2.5.0~ynh1 +**Shipped version:** 2.5.1~ynh1 ## Screenshots diff --git a/README_fr.md b/README_fr.md index 227ff39..79cf926 100644 --- a/README_fr.md +++ b/README_fr.md @@ -20,7 +20,7 @@ CodiMD est la version logicielle libre de HackMD, développée et ouverte par l' CodiMD est parfait pour les communautés ouvertes, tandis que HackMD met l'accent sur les autorisations et les contrôles d'accès pour les cas d'utilisation commerciale. -**Version incluse :** 2.5.0~ynh1 +**Version incluse :** 2.5.1~ynh1 ## Captures d’écran From 3aa638e1c968d41cc57b896f89f030fc63956ad6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 5 Jan 2024 11:55:36 +0100 Subject: [PATCH 28/35] Update manifest.toml --- manifest.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index a108771..ae6d32e 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "CodiMD" description.en = "Collaborative editor to work on notes written in Markdown" description.fr = "Éditeur collaboratif pour travailler sur des notes en Markdown" -version = "2.5.1~ynh1" +version = "2.5.2~ynh1" maintainers = ["eric_G"] @@ -41,8 +41,8 @@ ram.runtime = "50M" [resources] [resources.sources.main] - url = "https://github.com/hackmdio/codimd/archive/refs/tags/2.5.1.tar.gz" - sha256 = "667f51ef17f57cdf097d295d27e5866d74b67b25cdd25c9c9b0a9cc13c73f21d" + url = "https://github.com/hackmdio/codimd/archive/refs/tags/2.5.2.tar.gz" + sha256 = "fcbed97355c3d2f7965d772c857ea4369dba38a27816194d5d416ae026d911d9" autoupdate.strategy = "latest_github_tag" [resources.ports] From 16d72d1cbd237e4bc39bd87a60579f5d9f451e29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 8 Jan 2024 10:04:24 +0100 Subject: [PATCH 29/35] Update manifest.toml --- manifest.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index ae6d32e..dd65d4b 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "CodiMD" description.en = "Collaborative editor to work on notes written in Markdown" description.fr = "Éditeur collaboratif pour travailler sur des notes en Markdown" -version = "2.5.2~ynh1" +version = "2.5.3~ynh1" maintainers = ["eric_G"] @@ -41,8 +41,8 @@ ram.runtime = "50M" [resources] [resources.sources.main] - url = "https://github.com/hackmdio/codimd/archive/refs/tags/2.5.2.tar.gz" - sha256 = "fcbed97355c3d2f7965d772c857ea4369dba38a27816194d5d416ae026d911d9" + url = "https://github.com/hackmdio/codimd/archive/refs/tags/2.5.3.tar.gz" + sha256 = "28289aec6f2b8c2cd134af2b88b8076cf0f50da58855eda2dac6813a374df33d" autoupdate.strategy = "latest_github_tag" [resources.ports] From 54d18873b7405b1f94180f1e55a5bee74132d03e Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Mon, 8 Jan 2024 09:04:29 +0000 Subject: [PATCH 30/35] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 20076b0..1828305 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ CodiMD is the free software version of HackMD, developed and opened source by th CodiMD is perfect for open communities, while HackMD emphasizes on permission and access controls for commercial use cases. -**Shipped version:** 2.5.1~ynh1 +**Shipped version:** 2.5.3~ynh1 ## Screenshots diff --git a/README_fr.md b/README_fr.md index 79cf926..1061f78 100644 --- a/README_fr.md +++ b/README_fr.md @@ -20,7 +20,7 @@ CodiMD est la version logicielle libre de HackMD, développée et ouverte par l' CodiMD est parfait pour les communautés ouvertes, tandis que HackMD met l'accent sur les autorisations et les contrôles d'accès pour les cas d'utilisation commerciale. -**Version incluse :** 2.5.1~ynh1 +**Version incluse :** 2.5.3~ynh1 ## Captures d’écran From cd7f7dd972f9a39548caa1f3fbf686a058247cca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 14 Feb 2024 11:14:09 +0100 Subject: [PATCH 31/35] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index dd65d4b..1c398d2 100644 --- a/manifest.toml +++ b/manifest.toml @@ -7,7 +7,7 @@ description.fr = "Éditeur collaboratif pour travailler sur des notes en Markdow version = "2.5.3~ynh1" -maintainers = ["eric_G"] +maintainers = [] [upstream] license = "AGPL-3.0-only" From 84f9a2edc7720e61881866c8ba286efd2b592702 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 18 Jun 2024 08:45:46 +0200 Subject: [PATCH 32/35] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 1c398d2..85d30cf 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "CodiMD" description.en = "Collaborative editor to work on notes written in Markdown" description.fr = "Éditeur collaboratif pour travailler sur des notes en Markdown" -version = "2.5.3~ynh1" +version = "2.5.4~ynh1" maintainers = [] From 69b30974bb0f9e41b0dce0d2f20d4f565199b358 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 18 Jun 2024 06:45:51 +0000 Subject: [PATCH 33/35] Auto-update READMEs --- ALL_README.md | 8 ++++++++ README.md | 28 +++++++++++++------------- README_es.md | 50 +++++++++++++++++++++++++++++++++++++++++++++++ README_eu.md | 50 +++++++++++++++++++++++++++++++++++++++++++++++ README_fr.md | 32 +++++++++++++++--------------- README_gl.md | 50 +++++++++++++++++++++++++++++++++++++++++++++++ README_zh_Hans.md | 50 +++++++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 238 insertions(+), 30 deletions(-) create mode 100644 ALL_README.md create mode 100644 README_es.md create mode 100644 README_eu.md create mode 100644 README_gl.md create mode 100644 README_zh_Hans.md diff --git a/ALL_README.md b/ALL_README.md new file mode 100644 index 0000000..152f2e7 --- /dev/null +++ b/ALL_README.md @@ -0,0 +1,8 @@ +# All available README files by language + +- [Read the README in English](README.md) +- [Lea el README en español](README_es.md) +- [Irakurri README euskaraz](README_eu.md) +- [Lire le README en français](README_fr.md) +- [Le o README en galego](README_gl.md) +- [阅读中文(简体)的 README](README_zh_Hans.md) diff --git a/README.md b/README.md index 1828305..d7f0ac8 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ @@ -9,10 +9,10 @@ It shall NOT be edited by hand. [![Install CodiMD with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=codimd) -*[Lire ce readme en français.](./README_fr.md)* +*[Read this README in other languages.](./ALL_README.md)* -> *This package allows you to install CodiMD 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.* +> *This package allows you to install CodiMD 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.* ## Overview @@ -20,7 +20,7 @@ CodiMD is the free software version of HackMD, developed and opened source by th CodiMD is perfect for open communities, while HackMD emphasizes on permission and access controls for commercial use cases. -**Shipped version:** 2.5.3~ynh1 +**Shipped version:** 2.5.4~ynh1 ## Screenshots @@ -28,20 +28,20 @@ CodiMD is perfect for open communities, while HackMD emphasizes on permission an ## Documentation and resources -* Official app website: -* Official user documentation: -* Official admin documentation: -* Upstream app code repository: -* YunoHost Store: -* Report a bug: +- Official app website: +- Official user documentation: +- Official admin documentation: +- Upstream app code repository: +- YunoHost Store: +- Report a bug: ## Developer info -Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/codimd_ynh/tree/testing). +Please send your pull request to the [`testing` branch](https://github.com/YunoHost-Apps/codimd_ynh/tree/testing). -To try the testing branch, please proceed like that. +To try the `testing` branch, please proceed like that: -``` bash +```bash sudo yunohost app install https://github.com/YunoHost-Apps/codimd_ynh/tree/testing --debug or sudo yunohost app upgrade codimd -u https://github.com/YunoHost-Apps/codimd_ynh/tree/testing --debug diff --git a/README_es.md b/README_es.md new file mode 100644 index 0000000..0fe7802 --- /dev/null +++ b/README_es.md @@ -0,0 +1,50 @@ + + +# CodiMD para Yunohost + +[![Nivel de integración](https://dash.yunohost.org/integration/codimd.svg)](https://dash.yunohost.org/appci/app/codimd) ![Estado funcional](https://ci-apps.yunohost.org/ci/badges/codimd.status.svg) ![Estado En Mantención](https://ci-apps.yunohost.org/ci/badges/codimd.maintain.svg) + +[![Instalar CodiMD con Yunhost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=codimd) + +*[Leer este README en otros idiomas.](./ALL_README.md)* + +> *Este paquete le permite instalarCodiMD rapidamente y simplement en un servidor YunoHost.* +> *Si no tiene YunoHost, visita [the guide](https://yunohost.org/install) para aprender como instalarla.* + +## Descripción general + +CodiMD is the free software version of HackMD, developed and opened source by the HackMD team with reduced features (without book mode), you can use CodiMD for your community and own all your data. [(See the origin of the name CodiMD.)](https://github.com/hackmdio/codimd/issues/720) + +CodiMD is perfect for open communities, while HackMD emphasizes on permission and access controls for commercial use cases. + +**Versión actual:** 2.5.4~ynh1 + +## Capturas + +![Captura de CodiMD](./doc/screenshots/screenshot.png) + +## Documentaciones y recursos + +- Sitio web oficial: +- Documentación usuario oficial: +- Documentación administrador oficial: +- Repositorio del código fuente oficial de la aplicación : +- Catálogo YunoHost: +- Reportar un error: + +## Información para desarrolladores + +Por favor enviar sus correcciones a la [`branch testing`](https://github.com/YunoHost-Apps/codimd_ynh/tree/testing + +Para probar la rama `testing`, sigue asÍ: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/codimd_ynh/tree/testing --debug +o +sudo yunohost app upgrade codimd -u https://github.com/YunoHost-Apps/codimd_ynh/tree/testing --debug +``` + +**Mas informaciones sobre el empaquetado de aplicaciones:** diff --git a/README_eu.md b/README_eu.md new file mode 100644 index 0000000..5e7e3f6 --- /dev/null +++ b/README_eu.md @@ -0,0 +1,50 @@ + + +# CodiMD YunoHost-erako + +[![Integrazio maila](https://dash.yunohost.org/integration/codimd.svg)](https://dash.yunohost.org/appci/app/codimd) ![Funtzionamendu egoera](https://ci-apps.yunohost.org/ci/badges/codimd.status.svg) ![Mantentze egoera](https://ci-apps.yunohost.org/ci/badges/codimd.maintain.svg) + +[![Instalatu CodiMD YunoHost-ekin](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=codimd) + +*[Irakurri README hau beste hizkuntzatan.](./ALL_README.md)* + +> *Pakete honek CodiMD YunoHost zerbitzari batean azkar eta zailtasunik gabe instalatzea ahalbidetzen dizu.* +> *YunoHost ez baduzu, kontsultatu [gida](https://yunohost.org/install) nola instalatu ikasteko.* + +## Aurreikuspena + +CodiMD is the free software version of HackMD, developed and opened source by the HackMD team with reduced features (without book mode), you can use CodiMD for your community and own all your data. [(See the origin of the name CodiMD.)](https://github.com/hackmdio/codimd/issues/720) + +CodiMD is perfect for open communities, while HackMD emphasizes on permission and access controls for commercial use cases. + +**Paketatutako bertsioa:** 2.5.4~ynh1 + +## Pantaila-argazkiak + +![CodiMD(r)en pantaila-argazkia](./doc/screenshots/screenshot.png) + +## Dokumentazioa eta baliabideak + +- Aplikazioaren webgune ofiziala: +- Erabiltzaileen dokumentazio ofiziala: +- Administratzaileen dokumentazio ofiziala: +- Jatorrizko aplikazioaren kode-gordailua: +- YunoHost Denda: +- Eman errore baten berri: + +## Garatzaileentzako informazioa + +Bidali `pull request`a [`testing` abarrera](https://github.com/YunoHost-Apps/codimd_ynh/tree/testing). + +`testing` abarra probatzeko, ondorengoa egin: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/codimd_ynh/tree/testing --debug +edo +sudo yunohost app upgrade codimd -u https://github.com/YunoHost-Apps/codimd_ynh/tree/testing --debug +``` + +**Informazio gehiago aplikazioaren paketatzeari buruz:** diff --git a/README_fr.md b/README_fr.md index 1061f78..c018be1 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,6 +1,6 @@ # CodiMD pour YunoHost @@ -9,10 +9,10 @@ It shall NOT be edited by hand. [![Installer CodiMD avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=codimd) -*[Read this readme in english.](./README.md)* +*[Lire le README dans d'autres langues.](./ALL_README.md)* -> *Ce package vous permet d’installer CodiMD rapidement et simplement sur un serveur YunoHost. -Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l’installer et en profiter.* +> *Ce package vous permet d’installer CodiMD rapidement et simplement sur un serveur YunoHost.* +> *Si vous n’avez pas YunoHost, consultez [ce guide](https://yunohost.org/install) pour savoir comment l’installer et en profiter.* ## Vue d’ensemble @@ -20,7 +20,7 @@ CodiMD est la version logicielle libre de HackMD, développée et ouverte par l' CodiMD est parfait pour les communautés ouvertes, tandis que HackMD met l'accent sur les autorisations et les contrôles d'accès pour les cas d'utilisation commerciale. -**Version incluse :** 2.5.3~ynh1 +**Version incluse :** 2.5.4~ynh1 ## Captures d’écran @@ -28,23 +28,23 @@ CodiMD est parfait pour les communautés ouvertes, tandis que HackMD met l'accen ## Documentations et ressources -* Site officiel de l’app : -* Documentation officielle utilisateur : -* Documentation officielle de l’admin : -* Dépôt de code officiel de l’app : -* YunoHost Store: -* Signaler un bug : +- Site officiel de l’app : +- Documentation officielle utilisateur : +- Documentation officielle de l’admin : +- Dépôt de code officiel de l’app : +- YunoHost Store : +- Signaler un bug : ## Informations pour les développeurs -Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/codimd_ynh/tree/testing). +Merci de faire vos pull request sur la [branche `testing`](https://github.com/YunoHost-Apps/codimd_ynh/tree/testing). -Pour essayer la branche testing, procédez comme suit. +Pour essayer la branche `testing`, procédez comme suit : -``` bash +```bash sudo yunohost app install https://github.com/YunoHost-Apps/codimd_ynh/tree/testing --debug ou sudo yunohost app upgrade codimd -u https://github.com/YunoHost-Apps/codimd_ynh/tree/testing --debug ``` -**Plus d’infos sur le packaging d’applications :** \ No newline at end of file +**Plus d’infos sur le packaging d’applications :** diff --git a/README_gl.md b/README_gl.md new file mode 100644 index 0000000..228d040 --- /dev/null +++ b/README_gl.md @@ -0,0 +1,50 @@ + + +# CodiMD para YunoHost + +[![Nivel de integración](https://dash.yunohost.org/integration/codimd.svg)](https://dash.yunohost.org/appci/app/codimd) ![Estado de funcionamento](https://ci-apps.yunohost.org/ci/badges/codimd.status.svg) ![Estado de mantemento](https://ci-apps.yunohost.org/ci/badges/codimd.maintain.svg) + +[![Instalar CodiMD con YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=codimd) + +*[Le este README en outros idiomas.](./ALL_README.md)* + +> *Este paquete permíteche instalar CodiMD de xeito rápido e doado nun servidor YunoHost.* +> *Se non usas YunoHost, le a [documentación](https://yunohost.org/install) para saber como instalalo.* + +## Vista xeral + +CodiMD is the free software version of HackMD, developed and opened source by the HackMD team with reduced features (without book mode), you can use CodiMD for your community and own all your data. [(See the origin of the name CodiMD.)](https://github.com/hackmdio/codimd/issues/720) + +CodiMD is perfect for open communities, while HackMD emphasizes on permission and access controls for commercial use cases. + +**Versión proporcionada:** 2.5.4~ynh1 + +## Capturas de pantalla + +![Captura de pantalla de CodiMD](./doc/screenshots/screenshot.png) + +## Documentación e recursos + +- Web oficial da app: +- Documentación oficial para usuarias: +- Documentación oficial para admin: +- Repositorio de orixe do código: +- Tenda YunoHost: +- Informar dun problema: + +## Info de desenvolvemento + +Envía a túa colaboración á [rama `testing`](https://github.com/YunoHost-Apps/codimd_ynh/tree/testing). + +Para probar a rama `testing`, procede deste xeito: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/codimd_ynh/tree/testing --debug +ou +sudo yunohost app upgrade codimd -u https://github.com/YunoHost-Apps/codimd_ynh/tree/testing --debug +``` + +**Máis info sobre o empaquetado da app:** diff --git a/README_zh_Hans.md b/README_zh_Hans.md new file mode 100644 index 0000000..b671f51 --- /dev/null +++ b/README_zh_Hans.md @@ -0,0 +1,50 @@ + + +# YunoHost 上的 CodiMD + +[![集成程度](https://dash.yunohost.org/integration/codimd.svg)](https://dash.yunohost.org/appci/app/codimd) ![工作状态](https://ci-apps.yunohost.org/ci/badges/codimd.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/codimd.maintain.svg) + +[![使用 YunoHost 安装 CodiMD](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=codimd) + +*[阅读此 README 的其它语言版本。](./ALL_README.md)* + +> *通过此软件包,您可以在 YunoHost 服务器上快速、简单地安装 CodiMD。* +> *如果您还没有 YunoHost,请参阅[指南](https://yunohost.org/install)了解如何安装它。* + +## 概况 + +CodiMD is the free software version of HackMD, developed and opened source by the HackMD team with reduced features (without book mode), you can use CodiMD for your community and own all your data. [(See the origin of the name CodiMD.)](https://github.com/hackmdio/codimd/issues/720) + +CodiMD is perfect for open communities, while HackMD emphasizes on permission and access controls for commercial use cases. + +**分发版本:** 2.5.4~ynh1 + +## 截图 + +![CodiMD 的截图](./doc/screenshots/screenshot.png) + +## 文档与资源 + +- 官方应用网站: +- 官方用户文档: +- 官方管理文档: +- 上游应用代码库: +- YunoHost 商店: +- 报告 bug: + +## 开发者信息 + +请向 [`testing` 分支](https://github.com/YunoHost-Apps/codimd_ynh/tree/testing) 发送拉取请求。 + +如要尝试 `testing` 分支,请这样操作: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/codimd_ynh/tree/testing --debug +或 +sudo yunohost app upgrade codimd -u https://github.com/YunoHost-Apps/codimd_ynh/tree/testing --debug +``` + +**有关应用打包的更多信息:** From f71aa9cd685892e84e30e21761f20c414cff2d10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 18 Jun 2024 08:48:34 +0200 Subject: [PATCH 34/35] 2.5.4 --- manifest.toml | 4 ++-- scripts/_common.sh | 2 +- scripts/backup | 6 +----- scripts/remove | 4 +--- scripts/upgrade | 47 ++++++++++++---------------------------------- 5 files changed, 17 insertions(+), 46 deletions(-) diff --git a/manifest.toml b/manifest.toml index 85d30cf..caf2a45 100644 --- a/manifest.toml +++ b/manifest.toml @@ -41,8 +41,8 @@ ram.runtime = "50M" [resources] [resources.sources.main] - url = "https://github.com/hackmdio/codimd/archive/refs/tags/2.5.3.tar.gz" - sha256 = "28289aec6f2b8c2cd134af2b88b8076cf0f50da58855eda2dac6813a374df33d" + url = "https://github.com/hackmdio/codimd/archive/refs/tags/2.5.4.tar.gz" + sha256 = "1bd556e617188bd82fe40460a16eaeead495a87b2dd1417b12d2b8b6319ff131" autoupdate.strategy = "latest_github_tag" [resources.ports] diff --git a/scripts/_common.sh b/scripts/_common.sh index b818f0f..44277c5 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,7 +4,7 @@ # COMMON VARIABLES #================================================= -nodejs_version=16 +nodejs_version=20 #================================================= # PERSONAL HELPERS diff --git a/scripts/backup b/scripts/backup index d487780..78b4491 100644 --- a/scripts/backup +++ b/scripts/backup @@ -22,15 +22,11 @@ ynh_print_info --message="Declaring files to be backed up..." ynh_backup --src_path="$install_dir" #================================================= -# BACKUP THE NGINX CONFIGURATION +# SYSTEM CONFIGURATION #================================================= ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# BACKUP SYSTEMD -#================================================= - ynh_backup --src_path="/etc/systemd/system/$app.service" #================================================= diff --git a/scripts/remove b/scripts/remove index 64802ec..2e560e2 100644 --- a/scripts/remove +++ b/scripts/remove @@ -10,9 +10,7 @@ source _common.sh source /usr/share/yunohost/helpers #================================================= -# STANDARD REMOVE -#================================================= -# REMOVE SERVICE INTEGRATION IN YUNOHOST +# REMOVE SYSTEM CONFIGURATIONS #================================================= ynh_script_progression --message="Removing system configurations related to $app..." --weight=1 diff --git a/scripts/upgrade b/scripts/upgrade index cd36635..9b0fc7d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -9,12 +9,6 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# CHECK VERSION -#================================================= - -upgrade_type=$(ynh_check_app_version_changed) - #================================================= # STANDARD UPGRADE STEPS #================================================= @@ -27,26 +21,14 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= +ynh_script_progression --message="Upgrading source files..." --weight=16 -if [ "$upgrade_type" == "UPGRADE_APP" ] -then - ynh_script_progression --message="Upgrading source files..." --weight=16 - - # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir=$install_dir --keep="config.json .sequelizerc" -fi +# Download, check integrity, uncompress and patch the source from app.src +ynh_setup_source --dest_dir=$install_dir --keep="config.json .sequelizerc" chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=2 - -# Create a dedicated NGINX config -ynh_add_nginx_config - #================================================= # UPGRADE DEPENDENCIES #================================================= @@ -60,30 +42,25 @@ ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version #============================================== # INSTALL CODIMD #============================================== -if [ "$upgrade_type" == "UPGRADE_APP" ] -then - ynh_script_progression --message="Building CodiMD... (this will take some time and resources!)" --weight=16 +ynh_script_progression --message="Building CodiMD... (this will take some time and resources!)" --weight=16 - pushd "$install_dir" - ynh_use_nodejs - ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH bin/setup - ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm run build - popd -fi +pushd "$install_dir" + ynh_use_nodejs + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH bin/setup + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm run build +popd #================================================= # SETUP SYSTEMD #================================================= ynh_script_progression --message="Upgrading systemd configuration..." --weight=2 +# Create a dedicated NGINX config +ynh_add_nginx_config + # Create a dedicated systemd config ynh_add_systemd_config -#================================================= -# INTEGRATE SERVICE IN YUNOHOST -#================================================= -ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 - yunohost service add $app --description="Collaborative Markdown notes" --log="/var/log/$app/$app.log" #================================================= From 7408ecdbdc7de633a36f7e526f32c97f6b747922 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 18 Jun 2024 08:57:56 +0200 Subject: [PATCH 35/35] Update _common.sh --- scripts/_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 44277c5..b818f0f 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,7 +4,7 @@ # COMMON VARIABLES #================================================= -nodejs_version=20 +nodejs_version=16 #================================================= # PERSONAL HELPERS