From 17099113bd8c92319d0a60aac17a945c7413fc6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 23 Aug 2021 07:35:18 +0200 Subject: [PATCH 1/2] Testing (#58) * Update upgrade --- README.md | 2 +- README_fr.md | 2 +- manifest.json | 2 +- scripts/upgrade | 10 ++++++++++ 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e825628..abafb27 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 Self-hosted remote torrent client -**Shipped version:** 1.3.6~ynh2 +**Shipped version:** 1.3.6~ynh3 diff --git a/README_fr.md b/README_fr.md index 3ce1b17..daf14c9 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 Client torrent distant auto-hébergé -**Version incluse :** 1.3.6~ynh2 +**Version incluse :** 1.3.6~ynh3 diff --git a/manifest.json b/manifest.json index 785b3a4..f5d60a6 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Self-hosted remote torrent client", "fr": "Client torrent distant auto-hébergé" }, - "version": "1.3.6~ynh2", + "version": "1.3.6~ynh3", "url": "https://github.com/boypt/simple-torrent", "upstream": { "license": "AGPL-3.0-only", diff --git a/scripts/upgrade b/scripts/upgrade index af6a90b..3e414b7 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -118,6 +118,16 @@ ynh_script_progression --message="Modifying a config file..." --weight=1 ynh_add_config --template="../conf/config.default.yml" --destination="$final_path/config.yml" +#================================================= +# CREATE DIRECTORIES +#================================================= + +mkdir -p /home/yunohost.app/$app/{torrents,downloads} + +chown -R $app:www-data /home/yunohost.app/$app +chmod 755 /home/yunohost.app/$app/{torrents,downloads} + +#================================================= #================================================= # SETUP SYSTEMD #================================================= From e85de26b592fb4144e9fe04dffb4e20cd52457e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 16 Sep 2021 10:35:08 +0200 Subject: [PATCH 2/2] Create updater.yml --- .github/workflows/updater.yml | 48 +++++++++++++++++++++++++++++++++++ 1 file changed, 48 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..ca77fed --- /dev/null +++ b/.github/workflows/updater.yml @@ -0,0 +1,48 @@ +# 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 + branch: ci-auto-update-v${{ env.VERSION }} + delete-branch: true + title: 'Upgrade to version ${{ env.VERSION }}' + body: | + Upgrade to v${{ env.VERSION }} + draft: false