From 7ee803cd80a7332d5cea53e8cc61eb96aa1a5053 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Tue, 24 May 2022 22:49:14 +0200 Subject: [PATCH 1/2] Upgrade to 9.0.1~ynh2 --- .github/workflows/updater.sh | 39 ++++---------------- updater.yml => .github/workflows/updater.yml | 1 + check_process | 4 +- conf/app.src | 4 +- doc/DESCRIPTION.md | 9 +++++ manifest.json | 12 +++--- phpci.yml | 10 ----- scripts/install | 8 ++-- scripts/remove | 16 ++++---- scripts/restore | 4 +- scripts/upgrade | 6 +-- 11 files changed, 45 insertions(+), 68 deletions(-) rename updater.yml => .github/workflows/updater.yml (99%) create mode 100644 doc/DESCRIPTION.md delete mode 100644 phpci.yml diff --git a/.github/workflows/updater.sh b/.github/workflows/updater.sh index 6166e6c..3aa8932 100755 --- a/.github/workflows/updater.sh +++ b/.github/workflows/updater.sh @@ -9,9 +9,6 @@ # 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 #================================================= @@ -20,8 +17,8 @@ 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 "'")) +version=$(curl --location --silent "https://api.github.com/repos/$repo/releases" | jq -r '.[] | select( .prerelease != true ) | .tag_name' | sort -V | tail -1) +assets="https://github.com/concretecms/concretecms/archive/refs/tags/$version.tar.gz" # Later down the script, we assume the version has only digits and dots # Sometimes the release name starts with a "v", so let's filter it out. @@ -34,6 +31,7 @@ fi echo "Current version: $current_version" echo "Latest release from upstream: $version" echo "VERSION=$version" >> $GITHUB_ENV +echo "REPO=$repo" >> $GITHUB_ENV # For the time being, let's assume the script will fail echo "PROCEED=false" >> $GITHUB_ENV @@ -47,32 +45,16 @@ elif git ls-remote -q --exit-code --heads https://github.com/$GITHUB_REPOSITORY. 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 +# Let's download source tarball +asset_url=$assets 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 +src="app" # Create the temporary directory tempdir="$(mktemp -d)" @@ -97,17 +79,12 @@ cat < conf/$src.src SOURCE_URL=$asset_url SOURCE_SUM=$checksum SOURCE_SUM_PRG=sha256sum -SOURCE_FORMAT=tar.gz +SOURCE_FORMAT=$extension SOURCE_IN_SUBDIR=true +SOURCE_FILENAME= EOT echo "... conf/$src.src updated" -else -echo "... asset ignored" -fi - -done - #================================================= # SPECIFIC UPDATE STEPS #================================================= diff --git a/updater.yml b/.github/workflows/updater.yml similarity index 99% rename from updater.yml rename to .github/workflows/updater.yml index fb72ba0..5f1dcc1 100644 --- a/updater.yml +++ b/.github/workflows/updater.yml @@ -47,3 +47,4 @@ jobs: body: | Upgrade to v${{ env.VERSION }} draft: false + diff --git a/check_process b/check_process index 4ca13ce..39d1949 100644 --- a/check_process +++ b/check_process @@ -2,9 +2,9 @@ ; Manifest domain="domain.tld" path="/path" - admin="john" - language="fr_FR" is_public=1 + language="fr_FR" + admin="john" password="1Strong-Password" website_title="site" ; Checks diff --git a/conf/app.src b/conf/app.src index eaf24ee..61c196b 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,7 @@ SOURCE_URL=https://github.com/concrete5/concrete5/archive/9.0.1.tar.gz -SOURCE_SUM=348debdff928b5fb777dde762c1521311d01a3cb09c325b68f5ee7d0f61e0d03 +SOURCE_SUM=0dc5d37da948c1b5bab4dc8291e9a97488cb53f521c8e56cf118008ae99f9e38 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true +SOURCE_FILENAME= +SOURCE_EXTRACT=true diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md new file mode 100644 index 0000000..3c961da --- /dev/null +++ b/doc/DESCRIPTION.md @@ -0,0 +1,9 @@ +Concrete5 is a modern CMS. +Features : +* SEO Tools +* User mangament +* Secure +* Intuitive Editing +* Theme and Block management +* Marketing tools +* **and more**... diff --git a/manifest.json b/manifest.json index 0110482..daf4b92 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Open Source Content Management System for Teams", "fr": "Système de gestion de contenu Open Source pour les équipes" }, - "version": "9.0.1~ynh1", + "version": "9.0.1~ynh2", "url": "www.concrete5.org", "upstream": { "license": "MIT", @@ -29,7 +29,7 @@ "mysql" ], "arguments": { - "install" : [ + "install": [ { "name": "domain", "type": "domain" @@ -40,10 +40,6 @@ "example": "/concrete", "default": "/concrete" }, - { - "name": "admin", - "type": "user" - }, { "name": "is_public", "type": "boolean", @@ -59,6 +55,10 @@ "choices": ["en_US", "fr_FR", "de_DE", "pt_PT"], "default": "en_US" }, + { + "name": "admin", + "type": "user" + }, { "name": "password", "type": "password" diff --git a/phpci.yml b/phpci.yml deleted file mode 100644 index 2288d90..0000000 --- a/phpci.yml +++ /dev/null @@ -1,10 +0,0 @@ -build_settings: - clone_depth: 1 # depth of 1 is a shallow clone, remove this line to clone entire repo - -setup: - shell : - command: "/home/package_check/package_check.sh -f -y %BUILD_PATH%" - -complete: - email: - default_mailto_address: abld@tutanota.com diff --git a/scripts/install b/scripts/install index 29b4db5..872ebe2 100644 --- a/scripts/install +++ b/scripts/install @@ -25,12 +25,12 @@ ynh_abort_if_errors domain=$YNH_APP_ARG_DOMAIN path_url=$YNH_APP_ARG_PATH -admin=$YNH_APP_ARG_ADMIN is_public=$YNH_APP_ARG_IS_PUBLIC language=$YNH_APP_ARG_LANGUAGE +admin=$YNH_APP_ARG_ADMIN password=$YNH_APP_ARG_PASSWORD website_title=$YNH_APP_ARG_WEBSITE_TITLE -admin_email=$(ynh_user_get_info $admin 'mail') +admin_email=$(ynh_user_get_info --username=$admin --key="mail") app=$YNH_APP_INSTANCE_NAME @@ -52,8 +52,8 @@ ynh_script_progression --message="Storing installation settings..." ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=path --value=$path_url -ynh_app_setting_set --app=$app --key=admin --value=$admin ynh_app_setting_set --app=$app --key=language --value=$language +ynh_app_setting_set --app=$app --key=admin --value=$admin ynh_app_setting_set --app=$app --key=admin_email --value=$admin_email ynh_app_setting_set --app=$app --key=website_title --value=$website_title @@ -72,7 +72,7 @@ ynh_install_app_dependencies $pkg_dependencies ynh_script_progression --message="Configuring system user..." # Create a system user -ynh_system_user_create --username=$app --home_dir=$final_path +ynh_system_user_create --username=$app --home_dir="$final_path" #================================================= # CREATE A MYSQL DATABASE diff --git a/scripts/remove b/scripts/remove index 17ce220..9fb39ec 100644 --- a/scripts/remove +++ b/scripts/remove @@ -31,14 +31,6 @@ ynh_script_progression --message="Removing the MySQL database..." # Remove a database if it exists, along with the associated user ynh_mysql_remove_db --db_user=$db_user --db_name=$db_name -#================================================= -# REMOVE DEPENDENCIES -#================================================= -ynh_script_progression --message="Removing dependencies..." - -# Remove metapackage and its dependencies -ynh_remove_app_dependencies - #================================================= # REMOVE APP MAIN DIR #================================================= @@ -63,6 +55,14 @@ ynh_script_progression --message="Removing PHP-FPM configuration..." # Remove the dedicated PHP-FPM config ynh_remove_fpm_config +#================================================= +# REMOVE DEPENDENCIES +#================================================= +ynh_script_progression --message="Removing dependencies..." + +# Remove metapackage and its dependencies +ynh_remove_app_dependencies + #================================================= # GENERIC FINALIZATION #================================================= diff --git a/scripts/restore b/scripts/restore index 5be6148..f2fd29d 100644 --- a/scripts/restore +++ b/scripts/restore @@ -39,8 +39,6 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= ynh_script_progression --message="Validating restoration parameters..." -ynh_webpath_available --domain=$domain --path_url=$path_url \ - || ynh_die --message="Path not available: ${domain}${path_url}" test ! -d $final_path \ || ynh_die --message="There is already a directory: $final_path " @@ -59,7 +57,7 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_script_progression --message="Recreating the dedicated system user..." # Create the dedicated user (if not existing) -ynh_system_user_create --username=$app --home_dir=$final_path +ynh_system_user_create --username=$app --home_dir="$final_path" #================================================= # RESTORE THE APP MAIN DIR diff --git a/scripts/upgrade b/scripts/upgrade index 426e9b4..ab8cad9 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -18,11 +18,10 @@ app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) +language=$(ynh_app_setting_get --app=$app --key=language) admin=$(ynh_app_setting_get --app=$app --key=admin) final_path=$(ynh_app_setting_get --app=$app --key=final_path) -language=$(ynh_app_setting_get --app=$app --key=language) db_name=$(ynh_app_setting_get --app=$app --key=db_name) -phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # CHECK VERSION @@ -65,7 +64,7 @@ fi ynh_script_progression --message="Making sure dedicated system user exists..." # Create a dedicated user (if not existing) -ynh_system_user_create --username=$app --home_dir=$final_path +ynh_system_user_create --username=$app --home_dir="$final_path" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -105,6 +104,7 @@ ynh_script_progression --message="Upgrading PHP-FPM configuration..." # Create a dedicated PHP-FPM config ynh_add_fpm_config --usage=low --footprint=low +phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # SPECIFIC UPGRADE From 60c96f097bb890647b256c0210c17c4324ee48d7 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 24 May 2022 20:49:18 +0000 Subject: [PATCH 2/2] Auto-update README --- README.md | 31 +++++++++++++++++++------------ README_fr.md | 37 ++++++++++++++++++++++++------------- 2 files changed, 43 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index e1783b6..f4be1d3 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ It shall NOT be edited by hand. # Concrete5 for YunoHost -[![Integration level](https://dash.yunohost.org/integration/concrete5.svg)](https://dash.yunohost.org/appci/app/concrete5) ![](https://ci-apps.yunohost.org/ci/badges/concrete5.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/concrete5.maintain.svg) +[![Integration level](https://dash.yunohost.org/integration/concrete5.svg)](https://dash.yunohost.org/appci/app/concrete5) ![Working status](https://ci-apps.yunohost.org/ci/badges/concrete5.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/concrete5.maintain.svg) [![Install Concrete5 with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=concrete5) *[Lire ce readme en français.](./README_fr.md)* @@ -15,12 +15,18 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in ## Overview -Open Source Content Management System for Teams - -**Shipped version:** 9.0.1~ynh1 - +Concrete5 is a modern CMS. +Features : +* SEO Tools +* User mangament +* Secure +* Intuitive Editing +* Theme and Block management +* Marketing tools +* **and more**... +**Shipped version:** 9.0.1~ynh2 ## Disclaimers / important information * Any known limitations, constrains or stuff not working, such as (but not limited to): @@ -28,21 +34,22 @@ Open Source Content Management System for Teams ## Documentation and resources -* Official app website: https://www.concrete5.org/ -* Official admin documentation: https://documentation.concrete5.org/ -* Upstream app code repository: https://github.com/concrete5/concrete5 -* YunoHost documentation for this app: https://yunohost.org/app_concrete5 -* Report a bug: https://github.com/YunoHost-Apps/concrete5_ynh/issues +* Official app website: +* Official admin documentation: +* Upstream app code repository: +* YunoHost documentation for this app: +* Report a bug: ## Developer info Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/concrete5_ynh/tree/testing). To try the testing branch, please proceed like that. -``` + +``` bash sudo yunohost app install https://github.com/YunoHost-Apps/concrete5_ynh/tree/testing --debug or sudo yunohost app upgrade concrete5 -u https://github.com/YunoHost-Apps/concrete5_ynh/tree/testing --debug ``` -**More info regarding app packaging:** https://yunohost.org/packaging_apps \ No newline at end of file +**More info regarding app packaging:** diff --git a/README_fr.md b/README_fr.md index 140499f..d915b18 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,22 +1,32 @@ + + # Concrete5 pour YunoHost -[![Niveau d'intégration](https://dash.yunohost.org/integration/concrete5.svg)](https://dash.yunohost.org/appci/app/concrete5) ![](https://ci-apps.yunohost.org/ci/badges/concrete5.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/concrete5.maintain.svg) +[![Niveau d'intégration](https://dash.yunohost.org/integration/concrete5.svg)](https://dash.yunohost.org/appci/app/concrete5) ![Status du fonctionnement](https://ci-apps.yunohost.org/ci/badges/concrete5.status.svg) ![Status de maintenance](https://ci-apps.yunohost.org/ci/badges/concrete5.maintain.svg) [![Installer Concrete5 avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=concrete5) *[Read this readme in english.](./README.md)* -*[Lire ce readme en français.](./README_fr.md)* > *Ce package vous permet d'installer Concrete5 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 -Système de gestion de contenu Open Source pour les équipes - -**Version incluse :** 9.0.1~ynh1 - +Concrete5 is a modern CMS. +Features : +* SEO Tools +* User mangament +* Secure +* Intuitive Editing +* Theme and Block management +* Marketing tools +* **and more**... +**Version incluse :** 9.0.1~ynh2 ## Avertissements / informations importantes * Any known limitations, constrains or stuff not working, such as (but not limited to): @@ -24,21 +34,22 @@ Système de gestion de contenu Open Source pour les équipes ## Documentations et ressources -* Site officiel de l'app : https://www.concrete5.org/ -* Documentation officielle de l'admin : https://documentation.concrete5.org/ -* Dépôt de code officiel de l'app : https://github.com/concrete5/concrete5 -* Documentation YunoHost pour cette app : https://yunohost.org/app_concrete5 -* Signaler un bug : https://github.com/YunoHost-Apps/concrete5_ynh/issues +* Site 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 : ## Informations pour les développeurs Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/concrete5_ynh/tree/testing). Pour essayer la branche testing, procédez comme suit. -``` + +``` bash sudo yunohost app install https://github.com/YunoHost-Apps/concrete5_ynh/tree/testing --debug ou sudo yunohost app upgrade concrete5 -u https://github.com/YunoHost-Apps/concrete5_ynh/tree/testing --debug ``` -**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps \ No newline at end of file +**Plus d'infos sur le packaging d'applications :**