From 9633b9bbcc5130b7fd02ada5f263ea5374622cd9 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 7 Apr 2022 15:51:55 +0200 Subject: [PATCH 01/36] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index b26ee31..2032247 100755 --- a/scripts/install +++ b/scripts/install @@ -108,7 +108,7 @@ ynh_script_progression --message="Configuring PHP-FPM..." --weight=2 ynh_add_fpm_config #================================================= -# INSTALL LYCHEE WITH COMPOSER +# INSTALL 2FAUTH WITH COMPOSER #================================================= ynh_script_progression --message="Installing $app with Composer..." --weight=15 From 70cf2ec50a712765e55a2ff6bd33e1c933345838 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 7 Apr 2022 15:59:53 +0200 Subject: [PATCH 02/36] Fix --- conf/.env.example | 4 ++-- scripts/_common.sh | 4 ++-- scripts/upgrade | 9 +++++---- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/conf/.env.example b/conf/.env.example index f653a51..1ea2ef5 100644 --- a/conf/.env.example +++ b/conf/.env.example @@ -6,7 +6,7 @@ APP_NAME=2FAuth # You can leave this on "local". If you change it to production most console commands will ask for extra confirmation. # Never set it to "testing". -APP_ENV=local +APP_ENV=production # Set to true if you want to see debug information in error screens. @@ -109,4 +109,4 @@ PUSHER_APP_CLUSTER=mt1 MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" -MIX_ENV=local \ No newline at end of file +MIX_ENV=local diff --git a/scripts/_common.sh b/scripts/_common.sh index b990244..a8861c9 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -7,9 +7,9 @@ YNH_PHP_VERSION="7.3" # Composer version -YNH_COMPOSER_VERSION="2.1.3" +YNH_COMPOSER_VERSION="2.3.3" -pkg_dependencies="php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-mysql" +pkg_dependencies=" php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-bcmath php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-mysql" #================================================= # PERSONAL HELPERS diff --git a/scripts/upgrade b/scripts/upgrade index 247af25..5e4172b 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -116,11 +116,12 @@ ynh_script_progression --message="Building..." --weight=10 # Setup application config pushd $final_path - php$phpversion artisan migrate:refresh -n - php$phpversion artisan passport:install -n - php$phpversion artisan storage:link -n - php$phpversion artisan config:cache -n + php$phpversion artisan migrate -n + #php$phpversion artisan passport:install -n + #php$phpversion artisan storage:link -n + php$phpversion artisan config:clear -n popd + #================================================= # RELOAD NGINX #================================================= From 1087c30011cda32e8b649344740a85f130f44600 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 7 Apr 2022 16:04:49 +0200 Subject: [PATCH 03/36] Update .env.example --- conf/.env.example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/.env.example b/conf/.env.example index 1ea2ef5..0174860 100644 --- a/conf/.env.example +++ b/conf/.env.example @@ -6,7 +6,7 @@ APP_NAME=2FAuth # You can leave this on "local". If you change it to production most console commands will ask for extra confirmation. # Never set it to "testing". -APP_ENV=production +APP_ENV=local # Set to true if you want to see debug information in error screens. From 2648674d4b7927f447058d0d125e41dc1d474a44 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 7 Apr 2022 16:15:15 +0200 Subject: [PATCH 04/36] Fix --- conf/nginx.conf | 17 +++++++++++++---- scripts/_common.sh | 2 +- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index acd3d92..619b9b5 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -5,10 +5,19 @@ location / { index index.php; - #client_max_body_size 50M; + location = /favicon.ico { + access_log off; log_not_found off; + } - location = /favicon.ico { access_log off; log_not_found off; } - location = /robots.txt { access_log off; log_not_found off; } + location = /robots.txt { + access_log off; log_not_found off; + } + + location ~ /\.(?!well-known).* { + deny all; + } + + error_page 404 /index.php; try_files $uri $uri/ /index.php; @@ -20,6 +29,6 @@ location / { include fastcgi_params; fastcgi_param REMOTE_USER $remote_user; fastcgi_param PATH_INFO $fastcgi_path_info; - fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; } } diff --git a/scripts/_common.sh b/scripts/_common.sh index a8861c9..28674dc 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -9,7 +9,7 @@ YNH_PHP_VERSION="7.3" # Composer version YNH_COMPOSER_VERSION="2.3.3" -pkg_dependencies=" php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-bcmath php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-mysql" +pkg_dependencies="php${YNH_PHP_VERSION}-sqlite3 php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-bcmath php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-mysql" #================================================= # PERSONAL HELPERS From 3ff90c52fedc6c8844e277a91aa9ab1814ff3ab7 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 7 Apr 2022 16:42:15 +0200 Subject: [PATCH 05/36] Update install --- scripts/install | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/install b/scripts/install index 0a2ec24..6d0d50a 100755 --- a/scripts/install +++ b/scripts/install @@ -150,6 +150,8 @@ then ynh_permission_update --permission="main" --add="visitors" fi +ynh_permission_create --permission="api" --url="/api" --allowed="visitors" --show_tile="false" --protected="true" + #================================================= # RELOAD NGINX #================================================= From 8416e4587b1eaf8b10e1b6f0ce509ce413ab171e Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 7 Apr 2022 16:42:39 +0200 Subject: [PATCH 06/36] Update upgrade --- scripts/upgrade | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index 5e4172b..1a099d2 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -55,6 +55,11 @@ if ynh_legacy_permissions_exists; then ynh_app_setting_delete --app=$app --key=is_public fi +# Create a permission if needed +if ! ynh_permission_exists --permission="api"; then + ynh_permission_create --permission="api" --url="/api" --allowed="visitors" --show_tile="false" --protected="true" +fi + #================================================= # UPGRADE DEPENDENCIES #================================================= From e8d0636429c8eabb9f4e0dae37744556117a0052 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 7 Apr 2022 17:07:00 +0200 Subject: [PATCH 07/36] 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 28674dc..5c959b3 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,7 +4,7 @@ # COMMON VARIABLES #================================================= -YNH_PHP_VERSION="7.3" +YNH_PHP_VERSION="8.0" # Composer version YNH_COMPOSER_VERSION="2.3.3" From df9e5d73d7928f84658e340b7e09471680fed975 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 7 Apr 2022 17:07:30 +0200 Subject: [PATCH 08/36] 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 5c959b3..c770dd6 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -9,7 +9,7 @@ YNH_PHP_VERSION="8.0" # Composer version YNH_COMPOSER_VERSION="2.3.3" -pkg_dependencies="php${YNH_PHP_VERSION}-sqlite3 php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-bcmath php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-mysql" +pkg_dependencies="php${YNH_PHP_VERSION}-sqlite3 php${YNH_PHP_VERSION}-bcmath php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-mysql" #================================================= # PERSONAL HELPERS From 0c5ecd52128ebc3d3683be975297d05dfc03cc85 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 7 Apr 2022 17:09:55 +0200 Subject: [PATCH 09/36] Fix --- conf/.env.example | 2 +- scripts/_common.sh | 4 ++-- scripts/install | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/conf/.env.example b/conf/.env.example index 0174860..1ea2ef5 100644 --- a/conf/.env.example +++ b/conf/.env.example @@ -6,7 +6,7 @@ APP_NAME=2FAuth # You can leave this on "local". If you change it to production most console commands will ask for extra confirmation. # Never set it to "testing". -APP_ENV=local +APP_ENV=production # Set to true if you want to see debug information in error screens. diff --git a/scripts/_common.sh b/scripts/_common.sh index c770dd6..28674dc 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,12 +4,12 @@ # COMMON VARIABLES #================================================= -YNH_PHP_VERSION="8.0" +YNH_PHP_VERSION="7.3" # Composer version YNH_COMPOSER_VERSION="2.3.3" -pkg_dependencies="php${YNH_PHP_VERSION}-sqlite3 php${YNH_PHP_VERSION}-bcmath php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-mysql" +pkg_dependencies="php${YNH_PHP_VERSION}-sqlite3 php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-bcmath php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-mysql" #================================================= # PERSONAL HELPERS diff --git a/scripts/install b/scripts/install index 6d0d50a..c32f767 100755 --- a/scripts/install +++ b/scripts/install @@ -136,7 +136,7 @@ pushd $final_path php$phpversion artisan passport:install -n php$phpversion artisan storage:link -n php$phpversion artisan config:cache -n - php$phpversion artisan key:generate + php$phpversion artisan key:generate -n popd #================================================= From 97c325f56d167693002914095fe48ada5465e8d1 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 7 Apr 2022 17:11:46 +0200 Subject: [PATCH 10/36] Update .env.example --- conf/.env.example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/.env.example b/conf/.env.example index 1ea2ef5..0174860 100644 --- a/conf/.env.example +++ b/conf/.env.example @@ -6,7 +6,7 @@ APP_NAME=2FAuth # You can leave this on "local". If you change it to production most console commands will ask for extra confirmation. # Never set it to "testing". -APP_ENV=production +APP_ENV=local # Set to true if you want to see debug information in error screens. From 30539860d106c63e3a57c1308eb86dce1dd18bca Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 6 May 2022 11:45:31 +0200 Subject: [PATCH 11/36] set perm --- scripts/_common.sh | 2 +- scripts/install | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 28674dc..0bd7ef1 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -9,7 +9,7 @@ YNH_PHP_VERSION="7.3" # Composer version YNH_COMPOSER_VERSION="2.3.3" -pkg_dependencies="php${YNH_PHP_VERSION}-sqlite3 php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-bcmath php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-mysql" +pkg_dependencies="php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-bcmath php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-mysql" #================================================= # PERSONAL HELPERS diff --git a/scripts/install b/scripts/install index c32f767..3889682 100755 --- a/scripts/install +++ b/scripts/install @@ -122,7 +122,7 @@ ynh_script_progression --message="Adding a configuration file..." --weight=1 # Setup application config ynh_add_config --template="../conf/.env.example" --destination="$final_path/.env" -chmod 400 "$final_path/.env" +chmod 644 "$final_path/.env" chown $app:$app "$final_path/.env" #================================================= From 2280c7ecf5e569cd777371c84e3d022993da88a2 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 10 May 2022 08:02:15 +0200 Subject: [PATCH 12/36] 3.0.0 --- conf/app.src | 4 ++-- manifest.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/app.src b/conf/app.src index f8ef35c..562e580 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/Bubka/2FAuth/archive/refs/tags/v2.1.0.tar.gz -SOURCE_SUM=73d5db48c405d9bb8a98d21f56c5c700d9b64ccb7320ba685695977da92d801d +SOURCE_URL=https://github.com/Bubka/2FAuth/archive/refs/tags/v3.0.0.tar.gz +SOURCE_SUM=b890baf6958c6dcf93b72a2c2fbfcfc96f948921ffcdf74e492503da900d6aaf SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index e1b8b3f..9276a19 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "self-hosted alternative to One Time Passcode", "fr": "self-hosted alternative to One Time Passcode" }, - "version": "2.1.0~ynh2", + "version": "3.0.0~ynh1", "url": "https://github.com/Bubka/2FAuth", "upstream": { "license": "AGPL-3.0", From d56a368f2c0ad78623d0f6293573f565bba1c0d6 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 10 May 2022 06:02:20 +0000 Subject: [PATCH 13/36] 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 6af87b7..2a3af51 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ It aims to ease you perform your 2FA authentication steps whatever the device yo - Edit accounts, even the imported ones - Generate TOTP and HOTP security codes -**Shipped version:** 2.1.0~ynh2 +**Shipped version:** 3.0.0~ynh1 **Demo:** https://demo.2fauth.app/login diff --git a/README_fr.md b/README_fr.md index a2689db..ca2bec1 100644 --- a/README_fr.md +++ b/README_fr.md @@ -23,7 +23,7 @@ It aims to ease you perform your 2FA authentication steps whatever the device yo - Edit accounts, even the imported ones - Generate TOTP and HOTP security codes -**Version incluse :** 2.1.0~ynh2 +**Version incluse :** 3.0.0~ynh1 **Démo :** https://demo.2fauth.app/login From 615f81ec1beb0f1069298288a5cae8d790e66fa9 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 10 May 2022 08:03:31 +0200 Subject: [PATCH 14/36] Add templates --- .github/ISSUE_TEMPLATE.md | 55 +++++++++++++ .github/PULL_REQUEST_TEMPLATE.md | 16 ++++ .github/workflows/updater.sh | 137 +++++++++++++++++++++++++++++++ 3 files changed, 208 insertions(+) create mode 100755 .github/ISSUE_TEMPLATE.md create mode 100755 .github/PULL_REQUEST_TEMPLATE.md create mode 100755 .github/workflows/updater.sh diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100755 index 0000000..2729a6b --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,55 @@ +--- +name: Bug report +about: When creating a bug report, please use the following template to provide all the relevant information and help debugging efficiently. + +--- + +**How to post a meaningful bug report** +1. *Read this whole template first.* +2. *Determine if you are on the right place:* + - *If you were performing an action on the app from the webadmin or the CLI (install, update, backup, restore, change_url...), you are on the right place!* + - *Otherwise, the issue may be due to the app itself. Refer to its documentation or repository for help.* + - *When in doubt, post here and we will figure it out together.* +3. *Delete the italic comments as you write over them below, and remove this guide.* +--- + +### Describe the bug + +*A clear and concise description of what the bug is.* + +### Context + +- Hardware: *VPS bought online / Old laptop or computer / Raspberry Pi at home / Internet Cube with VPN / Other ARM board / ...* +- YunoHost version: x.x.x +- I have access to my server: *Through SSH | through the webadmin | direct access via keyboard / screen | ...* +- Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: *no / yes* + - If yes, please explain: +- Using, or trying to install package version/branch: +- If upgrading, current package version: *can be found in the admin, or with `yunohost app info $app_id`* + +### Steps to reproduce + +- *If you performed a command from the CLI, the command itself is enough. For example:* + ```sh + sudo yunohost app install the_app + ``` +- *If you used the webadmin, please perform the equivalent command from the CLI first.* +- *If the error occurs in your browser, explain what you did:* + 1. *Go to '...'* + 2. *Click on '...'* + 3. *Scroll down to '...'* + 4. *See error* + +### Expected behavior + +*A clear and concise description of what you expected to happen. You can remove this section if the command above is enough to understand your intent.* + +### Logs + +*When an operation fails, YunoHost provides a simple way to share the logs.* +- *In the webadmin, the error message contains a link to the relevant log page. On that page, you will be able to 'Share with Yunopaste'. If you missed it, the logs of previous operations are also available under Tools > Logs.* +- *In command line, the command to share the logs is displayed at the end of the operation and looks like `yunohost log display [log name] --share`. If you missed it, you can find the log ID of a previous operation using `yunohost log list`.* + +*After sharing the log, please copypaste directly the link provided by YunoHost (to help readability, no need to copypaste the entire content of the log here, just the link is enough...)* + +*If applicable and useful, add screenshots to help explain your problem.* diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100755 index 0000000..ef70e18 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,16 @@ +## Problem + +- *Description of why you made this PR* + +## Solution + +- *And how do you fix that problem* + +## PR Status + +- [ ] Code finished and ready to be reviewed/tested +- [ ] The fix/enhancement were manually tested (if applicable) + +## Automatic tests + +Automatic tests can be triggered on https://ci-apps-dev.yunohost.org/ *after creating the PR*, by commenting "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!". (N.B. : for this to work you need to be a member of the Yunohost-Apps organization) diff --git a/.github/workflows/updater.sh b/.github/workflows/updater.sh new file mode 100755 index 0000000..72eb5cb --- /dev/null +++ b/.github/workflows/updater.sh @@ -0,0 +1,137 @@ +#!/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 "'")) + +# 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. +# You may need more tweaks here if the upstream repository has different naming conventions. +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 +echo "REPO=$repo" >> $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 + *"admin"*) + src="app" + ;; + *"update"*) + src="app-upgrade" + ;; + *) + src="" + ;; +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 +SOURCE_FILENAME= +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 From 7564e7cf681b989c69fa7f09995611e5fff5c663 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 10 May 2022 08:04:51 +0200 Subject: [PATCH 15/36] Update manifest.json --- manifest.json | 1 + 1 file changed, 1 insertion(+) diff --git a/manifest.json b/manifest.json index 9276a19..7660471 100644 --- a/manifest.json +++ b/manifest.json @@ -11,6 +11,7 @@ "upstream": { "license": "AGPL-3.0", "demo": "https://demo.2fauth.app/login", + "admindoc": "https://docs.2fauth.app/", "code": "https://github.com/Bubka/2FAuth" }, "license": "AGPL-3.0", From 68c8637928d7904867ab1dd41f22a809ceab6600 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 10 May 2022 06:04:57 +0000 Subject: [PATCH 16/36] Auto-update README --- README.md | 1 + README_fr.md | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index 2a3af51..b888d2e 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,7 @@ It aims to ease you perform your 2FA authentication steps whatever the device yo ## Documentation and resources +* Official admin documentation: https://docs.2fauth.app/ * Upstream app code repository: https://github.com/Bubka/2FAuth * YunoHost documentation for this app: https://yunohost.org/app_2fauth * Report a bug: https://github.com/YunoHost-Apps/2fauth_ynh/issues diff --git a/README_fr.md b/README_fr.md index ca2bec1..92b5e16 100644 --- a/README_fr.md +++ b/README_fr.md @@ -33,6 +33,7 @@ It aims to ease you perform your 2FA authentication steps whatever the device yo ## Documentations et ressources +* Documentation officielle de l'admin : https://docs.2fauth.app/ * Dépôt de code officiel de l'app : https://github.com/Bubka/2FAuth * Documentation YunoHost pour cette app : https://yunohost.org/app_2fauth * Signaler un bug : https://github.com/YunoHost-Apps/2fauth_ynh/issues From 0365865266a1b5aedc51e36a3455d0e104bbae54 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 10 May 2022 08:06:21 +0200 Subject: [PATCH 17/36] 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 0bd7ef1..b9dbd28 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,7 +4,7 @@ # COMMON VARIABLES #================================================= -YNH_PHP_VERSION="7.3" +YNH_PHP_VERSION="7.4" # Composer version YNH_COMPOSER_VERSION="2.3.3" From a29b5361011243e5303a14ed357c19437ca106a3 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 10 May 2022 08:08:12 +0200 Subject: [PATCH 18/36] Update nginx.conf --- conf/nginx.conf | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 619b9b5..080dd5d 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -5,13 +5,8 @@ location / { index index.php; - location = /favicon.ico { - access_log off; log_not_found off; - } - - location = /robots.txt { - access_log off; log_not_found off; - } + location = /favicon.ico { access_log off; log_not_found off; } + location = /robots.txt { access_log off; log_not_found off; } location ~ /\.(?!well-known).* { deny all; From 90bb4eecdc15d7b11b07fb8a4ce5a724b9838635 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 10 May 2022 08:13:24 +0200 Subject: [PATCH 19/36] Fix --- conf/.env.example | 2 +- scripts/install | 6 +++++- scripts/upgrade | 9 ++++++--- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/conf/.env.example b/conf/.env.example index 0174860..dd0a5c4 100644 --- a/conf/.env.example +++ b/conf/.env.example @@ -79,7 +79,7 @@ SESSION_DRIVER=file # Refer your email provider documentation to configure your mail settings # Set a value for every available setting to avoid issue -MAIL_DRIVER=log +MAIL_DRIVER=smtp MAIL_HOST=localhost MAIL_PORT=25 MAIL_FROM=admin@__DOMAIN__ diff --git a/scripts/install b/scripts/install index 3889682..cf0a504 100755 --- a/scripts/install +++ b/scripts/install @@ -112,7 +112,7 @@ ynh_add_fpm_config #================================================= ynh_script_progression --message="Installing $app with Composer..." --weight=15 -ynh_install_composer #--install_args="--ignore-platform-reqs" +ynh_install_composer --install_args="--prefer-dist --no-scripts --no-dev" #================================================= # ADD A CONFIGURATION @@ -139,6 +139,10 @@ pushd $final_path php$phpversion artisan key:generate -n popd +chmod 775 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" + #================================================= # SETUP SSOWAT #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 1a099d2..86a4d49 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -112,7 +112,7 @@ ynh_add_fpm_config #================================================= ynh_script_progression --message="Installing $app with Composer..." --weight=15 -ynh_install_composer +ynh_install_composer --install_args="--prefer-dist --no-scripts --no-dev" #================================================= # BUILDING @@ -121,10 +121,13 @@ ynh_script_progression --message="Building..." --weight=10 # Setup application config pushd $final_path + php$phpversion artisan cache:clear + php$phpversion artisan config:clear php$phpversion artisan migrate -n - #php$phpversion artisan passport:install -n + php$phpversion artisan passport:install -n #php$phpversion artisan storage:link -n - php$phpversion artisan config:clear -n + php$phpversion artisan config:cache -n + php$phpversion artisan route:cache popd #================================================= From c647871cc24e28154c7474a025d45328e8522aa3 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 10 May 2022 08:18:23 +0200 Subject: [PATCH 20/36] Update upgrade --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 86a4d49..48f9d03 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -121,7 +121,7 @@ ynh_script_progression --message="Building..." --weight=10 # Setup application config pushd $final_path - php$phpversion artisan cache:clear + #php$phpversion artisan cache:clear php$phpversion artisan config:clear php$phpversion artisan migrate -n php$phpversion artisan passport:install -n From 354e3da066c25d4f7fbf9f551defa92ffb414f3f Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 10 May 2022 08:20:15 +0200 Subject: [PATCH 21/36] Update upgrade --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 48f9d03..43d490a 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -122,7 +122,7 @@ ynh_script_progression --message="Building..." --weight=10 # Setup application config pushd $final_path #php$phpversion artisan cache:clear - php$phpversion artisan config:clear + #php$phpversion artisan config:clear php$phpversion artisan migrate -n php$phpversion artisan passport:install -n #php$phpversion artisan storage:link -n From cd970dcab1475a1fff368360c5c34bd0b32b4a35 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 10 May 2022 08:41:51 +0200 Subject: [PATCH 22/36] Update upgrade --- scripts/upgrade | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 43d490a..bbd617b 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -20,7 +20,7 @@ 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) -phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) +phpversion=$YNH_PHP_VERSION #================================================= # CHECK VERSION @@ -105,7 +105,7 @@ ynh_add_nginx_config ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=1 # Create a dedicated PHP-FPM config -ynh_add_fpm_config +ynh_add_fpm_config --phpversion=$phpversion #================================================= # INSTALL LYCHEE WITH COMPOSER From 9411085e785efa7b81de27220da82ae5dc5db519 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 10 May 2022 08:42:50 +0200 Subject: [PATCH 23/36] Update manifest.json --- manifest.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest.json b/manifest.json index 7660471..4530590 100644 --- a/manifest.json +++ b/manifest.json @@ -4,7 +4,7 @@ "packaging_format": 1, "description": { "en": "self-hosted alternative to One Time Passcode", - "fr": "self-hosted alternative to One Time Passcode" + "fr": "Alternative auto-hébergée a One Time Passcode" }, "version": "3.0.0~ynh1", "url": "https://github.com/Bubka/2FAuth", @@ -25,7 +25,7 @@ "multi_instance": true, "services": [ "nginx", - "php7.3-fpm", + "php7.4-fpm", "mysql" ], "arguments": { From 3ef418b96c6218c4d4b76314f2d09ce835f0f9d2 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 10 May 2022 08:44:12 +0200 Subject: [PATCH 24/36] Update updater.sh --- .github/workflows/updater.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/updater.sh b/.github/workflows/updater.sh index 72eb5cb..332937f 100755 --- a/.github/workflows/updater.sh +++ b/.github/workflows/updater.sh @@ -10,7 +10,7 @@ # automatic actions when a new upstream release is detected. # Remove this exit command when you are ready to run this Action -exit 1 +#exit 1 #================================================= # FETCHING LATEST RELEASE AND ITS ASSETS @@ -67,14 +67,14 @@ echo "Handling asset at $asset_url" # 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 - *"admin"*) + "v"*".tar.gz") src="app" ;; *"update"*) src="app-upgrade" ;; *) - src="" + src="app" ;; esac From ca868b3c0c94c28e8e4b3c1873a064330463c8ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 10 May 2022 08:44:31 +0200 Subject: [PATCH 25/36] Create updater.yml --- .github/workflows/updater.yml | 50 +++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/updater.yml diff --git a/.github/workflows/updater.yml b/.github/workflows/updater.yml new file mode 100644 index 0000000..4363d38 --- /dev/null +++ b/.github/workflows/updater.yml @@ -0,0 +1,50 @@ +# 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@v2 + 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@v3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + commit-message: Update to version ${{ env.VERSION }} + committer: 'yunohost-bot ' + author: 'yunohost-bot ' + signoff: false + base: testing + branch: ci-auto-update-v${{ env.VERSION }} + delete-branch: true + title: 'Upgrade to version ${{ env.VERSION }}' + body: | + Upgrade to v${{ env.VERSION }} + [See upstream release page](https://github.com/${{ env.REPO }}/releases/tag/v${{ env.VERSION }}) + draft: false From 83270614bc3a930595578bacd04e3be685913a1c Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 10 May 2022 08:45:44 +0200 Subject: [PATCH 26/36] Update _common.sh --- scripts/_common.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index b9dbd28..3b24e4d 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,12 +4,12 @@ # COMMON VARIABLES #================================================= -YNH_PHP_VERSION="7.4" +YNH_PHP_VERSION="8.0" # Composer version -YNH_COMPOSER_VERSION="2.3.3" +YNH_COMPOSER_VERSION="2.3.5" -pkg_dependencies="php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-bcmath php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-mysql" +pkg_dependencies="php${YNH_PHP_VERSION}-bcmath php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-mysql" #================================================= # PERSONAL HELPERS From c1d815659991760978ca4dcb764d1d93b87ac497 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 10 May 2022 10:06:56 +0200 Subject: [PATCH 27/36] Update check_process --- check_process | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/check_process b/check_process index a55c27f..f3b1686 100644 --- a/check_process +++ b/check_process @@ -11,7 +11,7 @@ setup_private=1 setup_public=1 upgrade=1 - #upgrade=1 from_commit=CommitHash + upgrade=1 from_commit=f883227999b72a9107acf7d353ccb90d2cd791f3 backup_restore=1 multi_instance=1 change_url=1 @@ -19,6 +19,6 @@ Email= Notification=none ;;; Upgrade options - ; commit=CommitHash - name=Name and date of the commit. + ; commit=f883227999b72a9107acf7d353ccb90d2cd791f3 + name=Merge pull request #1 from YunoHost-Apps/testing manifest_arg=domain=DOMAIN&path=PATH&is_public=1&language=fr&admin=USER&password=pass&port=666& From 2f2c54e9f0d32568773a9c6883d4d032c8b71ea3 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 10 May 2022 10:14:26 +0200 Subject: [PATCH 28/36] Fix --- manifest.json | 2 +- scripts/install | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest.json b/manifest.json index 4530590..034d56e 100644 --- a/manifest.json +++ b/manifest.json @@ -25,7 +25,7 @@ "multi_instance": true, "services": [ "nginx", - "php7.4-fpm", + "php8.0-fpm", "mysql" ], "arguments": { diff --git a/scripts/install b/scripts/install index cf0a504..ed1fc44 100755 --- a/scripts/install +++ b/scripts/install @@ -128,7 +128,7 @@ chown $app:$app "$final_path/.env" #================================================= # BUILDING #================================================= -ynh_script_progression --message="Building..." --weight=10 +ynh_script_progression --message="Building $app..." --weight=10 # Setup application config pushd $final_path From 4f29b667ff0c2bd26e6d46b7bccf32f2dda0a892 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 10 May 2022 10:37:24 +0200 Subject: [PATCH 29/36] Update upgrade --- scripts/upgrade | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index bbd617b..209b262 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -112,6 +112,8 @@ ynh_add_fpm_config --phpversion=$phpversion #================================================= ynh_script_progression --message="Installing $app with Composer..." --weight=15 +rm $final_path/package-lock.json + ynh_install_composer --install_args="--prefer-dist --no-scripts --no-dev" #================================================= From dfb0fd6b68df1918078fbf9715b65c0f9b740e90 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 10 May 2022 11:58:37 +0200 Subject: [PATCH 30/36] Update upgrade --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 209b262..540fe26 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -112,7 +112,7 @@ ynh_add_fpm_config --phpversion=$phpversion #================================================= ynh_script_progression --message="Installing $app with Composer..." --weight=15 -rm $final_path/package-lock.json +#rm $final_path/package-lock.json ynh_install_composer --install_args="--prefer-dist --no-scripts --no-dev" From 936b9237ba1a653615410392066a7d2cd1a7d90c Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 12 May 2022 07:33:21 +0200 Subject: [PATCH 31/36] 3.0.1 --- conf/app.src | 4 ++-- manifest.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/app.src b/conf/app.src index 562e580..5f4da21 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/Bubka/2FAuth/archive/refs/tags/v3.0.0.tar.gz -SOURCE_SUM=b890baf6958c6dcf93b72a2c2fbfcfc96f948921ffcdf74e492503da900d6aaf +SOURCE_URL=https://github.com/Bubka/2FAuth/archive/refs/tags/v3.0.1.tar.gz +SOURCE_SUM=bb00383f258d3afddc0dd12dc8cf8f54ab48d63cab8562d7e22a3a7cc4189173 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index 034d56e..1513bb4 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "self-hosted alternative to One Time Passcode", "fr": "Alternative auto-hébergée a One Time Passcode" }, - "version": "3.0.0~ynh1", + "version": "3.0.1~ynh1", "url": "https://github.com/Bubka/2FAuth", "upstream": { "license": "AGPL-3.0", From 9801dc8009e2dccb98be2f02c1a5f1890390e5b0 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Thu, 12 May 2022 05:33:25 +0000 Subject: [PATCH 32/36] 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 b888d2e..9099b67 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ It aims to ease you perform your 2FA authentication steps whatever the device yo - Edit accounts, even the imported ones - Generate TOTP and HOTP security codes -**Shipped version:** 3.0.0~ynh1 +**Shipped version:** 3.0.1~ynh1 **Demo:** https://demo.2fauth.app/login diff --git a/README_fr.md b/README_fr.md index 92b5e16..2149fc5 100644 --- a/README_fr.md +++ b/README_fr.md @@ -23,7 +23,7 @@ It aims to ease you perform your 2FA authentication steps whatever the device yo - Edit accounts, even the imported ones - Generate TOTP and HOTP security codes -**Version incluse :** 3.0.0~ynh1 +**Version incluse :** 3.0.1~ynh1 **Démo :** https://demo.2fauth.app/login From 5a95fe7abace4cabb8e89abd545acc4bd064dfc7 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 14 May 2022 15:23:19 +0200 Subject: [PATCH 33/36] 3.0.2 --- conf/app.src | 4 ++-- manifest.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/app.src b/conf/app.src index 5f4da21..f0b7889 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/Bubka/2FAuth/archive/refs/tags/v3.0.1.tar.gz -SOURCE_SUM=bb00383f258d3afddc0dd12dc8cf8f54ab48d63cab8562d7e22a3a7cc4189173 +SOURCE_URL=https://github.com/Bubka/2FAuth/archive/refs/tags/v3.0.2.tar.gz +SOURCE_SUM=608ff18abbdd8a71643fd9a4b7d152a06c749dd8156b8f62162fd4b42e9f8cec SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index 1513bb4..b1af93a 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "self-hosted alternative to One Time Passcode", "fr": "Alternative auto-hébergée a One Time Passcode" }, - "version": "3.0.1~ynh1", + "version": "3.0.2~ynh1", "url": "https://github.com/Bubka/2FAuth", "upstream": { "license": "AGPL-3.0", From b2885aa33587c74d6e9a79436eb39579c5107738 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 14 May 2022 13:23:23 +0000 Subject: [PATCH 34/36] 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 9099b67..0aab674 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ It aims to ease you perform your 2FA authentication steps whatever the device yo - Edit accounts, even the imported ones - Generate TOTP and HOTP security codes -**Shipped version:** 3.0.1~ynh1 +**Shipped version:** 3.0.2~ynh1 **Demo:** https://demo.2fauth.app/login diff --git a/README_fr.md b/README_fr.md index 2149fc5..532631f 100644 --- a/README_fr.md +++ b/README_fr.md @@ -23,7 +23,7 @@ It aims to ease you perform your 2FA authentication steps whatever the device yo - Edit accounts, even the imported ones - Generate TOTP and HOTP security codes -**Version incluse :** 3.0.1~ynh1 +**Version incluse :** 3.0.2~ynh1 **Démo :** https://demo.2fauth.app/login From 758f8247102144f720e49f4384fff567ce0219a2 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 15 May 2022 07:41:51 +0200 Subject: [PATCH 35/36] Update upgrade --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 540fe26..c48a1cd 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -114,7 +114,7 @@ ynh_script_progression --message="Installing $app with Composer..." --weight=15 #rm $final_path/package-lock.json -ynh_install_composer --install_args="--prefer-dist --no-scripts --no-dev" +ynh_install_composer --install_args="--ignore-platform-reqs --prefer-dist --no-scripts --no-dev" #================================================= # BUILDING From 457aa51c955684a1148accf61719da7938742a94 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 15 May 2022 08:31:53 +0200 Subject: [PATCH 36/36] Update upgrade --- scripts/upgrade | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index c48a1cd..5706240 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -121,13 +121,14 @@ ynh_install_composer --install_args="--ignore-platform-reqs --prefer-dist --no-s #================================================= ynh_script_progression --message="Building..." --weight=10 +ynh_exec_warn_less ynh_composer_exec --commands="update" + # Setup application config pushd $final_path - #php$phpversion artisan cache:clear - #php$phpversion artisan config:clear + php$phpversion artisan cache:clear + php$phpversion artisan config:clear php$phpversion artisan migrate -n php$phpversion artisan passport:install -n - #php$phpversion artisan storage:link -n php$phpversion artisan config:cache -n php$phpversion artisan route:cache popd