flatpak release script should support beta channel

This commit is contained in:
zadam
2022-09-12 22:35:22 +02:00
parent 9b8474a728
commit ca03c41205
3 changed files with 50 additions and 104 deletions

View File

@@ -13,11 +13,6 @@ then
exit 1
fi
VERSION_DATE=$(git log -1 --format=%aI v${VERSION} | cut -c -10)
VERSION_COMMIT=$(git rev-list -n 1 v${VERSION})
echo "Updating files with version ${VERSION}, date ${VERSION_DATE} and commit ${VERSION_COMMIT}"
# expecting the directory at a specific path
cd ~/trilium-flathub
@@ -26,6 +21,19 @@ if ! git diff-index --quiet HEAD --; then
exit 1
fi
if [[ $VERSION == *"beta"* ]]; then
git switch beta
else
git switch master
fi
git pull
VERSION_DATE=$(git log -1 --format=%aI v${VERSION} | cut -c -10)
VERSION_COMMIT=$(git rev-list -n 1 v${VERSION})
echo "Updating files with version ${VERSION}, date ${VERSION_DATE} and commit ${VERSION_COMMIT}"
flatpak-node-generator npm ../trilium/package-lock.json
xmlstarlet ed --inplace --update "/component/releases/release/@version" --value "${VERSION}" --update "/component/releases/release/@date" --value "${VERSION_DATE}" ./com.github.zadam.trilium.metainfo.xml