1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/flarum_ynh.git synced 2024-09-03 18:36:24 +02:00

Fix auto-updater

This commit is contained in:
tituspijean 2023-03-19 21:30:20 +01:00
parent 0d883daf2d
commit 58c5b87092
No known key found for this signature in database
GPG key ID: EF3B0D7CC0A94720
2 changed files with 5 additions and 3 deletions

View file

@ -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

View file

@ -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