mirror of
https://github.com/YunoHost-Apps/flarum_ynh.git
synced 2024-09-03 18:36:24 +02:00
Merge pull request #211 from YunoHost-Apps/fix-autoupdater
Fix auto-updater
This commit is contained in:
commit
1d74597e1b
2 changed files with 5 additions and 3 deletions
6
.github/workflows/updater.sh
vendored
6
.github/workflows/updater.sh
vendored
|
@ -14,9 +14,9 @@
|
|||
#=================================================
|
||||
|
||||
# Fetching information
|
||||
current_version=$(cat manifest.json | jq -j '.version|split("~")[0]')
|
||||
current_version=$(cat manifest.toml | tomlq -r '.version|split("~")[0]')
|
||||
current_project_version=$(grep -Po 'project_version="\K[^"]*' scripts/_common.sh)
|
||||
core_repo=$(cat manifest.json | jq -j '.upstream.code|split("https://github.com/")[1]')
|
||||
core_repo=$(cat manifest.toml | tomlq -r '.upstream.code|split("https://github.com/")[1]')
|
||||
project_repo="flarum/flarum"
|
||||
# Some jq magic is needed, because the latest upstream release is not always the latest version (e.g. security patches for older versions)
|
||||
# Core version may be higher than project version, and we actually download the project then perform Composer install.
|
||||
|
@ -104,7 +104,7 @@ echo "scripts/_common.sh patched"
|
|||
#=================================================
|
||||
|
||||
# Replace new version in manifest
|
||||
echo "$(jq -s --indent 4 ".[] | .version = \"$version~ynh1\"" manifest.json)" > manifest.json
|
||||
sed -i "/version =/c\version = \"$version~ynh1\"" manifest.toml
|
||||
|
||||
# No need to update the README, yunohost-bot takes care of it
|
||||
|
||||
|
|
2
.github/workflows/updater.yml
vendored
2
.github/workflows/updater.yml
vendored
|
@ -23,6 +23,8 @@ jobs:
|
|||
# Setting up Git user
|
||||
git config --global user.name 'yunohost-bot'
|
||||
git config --global user.email 'yunohost-bot@users.noreply.github.com'
|
||||
# Download yq/tomlq
|
||||
pip install yq
|
||||
# Run the updater script
|
||||
/bin/bash .github/workflows/updater.sh
|
||||
- name: Commit changes
|
||||
|
|
Loading…
Reference in a new issue