From 72bab0738b4eaf80f5fbef4bebf302e5c710efa5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 19 Nov 2021 23:02:10 +0100 Subject: [PATCH 1/3] Testing (#28) * Allow API --- README.md | 2 +- README_fr.md | 2 +- manifest.json | 2 +- scripts/install | 2 ++ scripts/upgrade | 5 +++++ 5 files changed, 10 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8da0a91..cd6c974 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Web-based groceries & household management solution for your home -**Shipped version:** 3.1.3~ynh1 +**Shipped version:** 3.1.3~ynh2 **Demo:** https://en.demo.grocy.info/stockoverview diff --git a/README_fr.md b/README_fr.md index c9f491e..9305346 100644 --- a/README_fr.md +++ b/README_fr.md @@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Solution Web de gestion d'épicerie et de gestion de la maison -**Version incluse :** 3.1.3~ynh1 +**Version incluse :** 3.1.3~ynh2 **Démo :** https://en.demo.grocy.info/stockoverview diff --git a/manifest.json b/manifest.json index 44da7f4..e87d4e6 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Web-based groceries & household management solution for your home", "fr": "Solution Web de gestion d'épicerie et de gestion de la maison" }, - "version": "3.1.3~ynh1", + "version": "3.1.3~ynh2", "url": "https://grocy.info", "upstream": { "license": "MIT", diff --git a/scripts/install b/scripts/install index 5202159..d339473 100644 --- a/scripts/install +++ b/scripts/install @@ -114,6 +114,8 @@ then ynh_permission_update --permission="main" --add="visitors" fi +ynh_permission_create --permission="api" --url="/api" --allowed="visitors" --auth_header="false" --show_tile="false" --protected="true" + #================================================= # RELOAD NGINX #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index a17e175..aed8bcf 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -60,6 +60,11 @@ if ynh_legacy_permissions_exists; then ynh_app_setting_delete --app=$app --key=is_public fi +# Add /api permission if needed +if ! ynh_permission_exists --permission="api"; then + ynh_permission_create --permission="api" --url="/api" --allowed="visitors" --auth_header="false" --show_tile="false" --protected="true" +fi + #================================================= # CREATE DEDICATED USER #================================================= From 62464757d0396829e77b7dc0fe9003aa4f0081f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 8 Dec 2021 22:49:09 +0100 Subject: [PATCH 2/3] Ericgaspar patch 1 (#30) * Testing (#28) * Allow API * Create updater.yml --- .github/workflows/updater.yml | 49 +++++++++++++++++++++++++++++++++++ 1 file changed, 49 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..fb72ba0 --- /dev/null +++ b/.github/workflows/updater.yml @@ -0,0 +1,49 @@ +# 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 }} + draft: false From 99c9be5d91eb97ac5089a990600d007db9392b88 Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Wed, 8 Dec 2021 21:49:13 +0000 Subject: [PATCH 3/3] 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 84eb3e6..cdf4de0 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in grocy is a web-based self-hosted groceries & household management solution for your home. -**Shipped version:** 3.1.3~ynh2 +**Shipped version:** 3.1.3~ynh3 **Demo:** https://en.demo.grocy.info/stockoverview diff --git a/README_fr.md b/README_fr.md index 363f645..42a7197 100644 --- a/README_fr.md +++ b/README_fr.md @@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour grocy is a web-based self-hosted groceries & household management solution for your home. -**Version incluse :** 3.1.3~ynh2 +**Version incluse :** 3.1.3~ynh3 **Démo :** https://en.demo.grocy.info/stockoverview