mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
flathub release script
This commit is contained in:
parent
e22af42cd0
commit
01910d3231
@ -17,21 +17,27 @@ VERSION_DATE=$(git log -1 --format=%aI "v${VERSION}" | cut -c -10)
|
|||||||
VERSION_COMMIT=$(git rev-list -n 1 "v${VERSION}")
|
VERSION_COMMIT=$(git rev-list -n 1 "v${VERSION}")
|
||||||
|
|
||||||
# expecting the directory at a specific path
|
# expecting the directory at a specific path
|
||||||
cd ~/trilium-flathub
|
cd ~/trilium-flathub || exit
|
||||||
|
|
||||||
if ! git diff-index --quiet HEAD --; then
|
if ! git diff-index --quiet HEAD --; then
|
||||||
echo "There are uncommitted changes"
|
echo "There are uncommitted changes"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
BASE_BRANCH=master
|
||||||
|
|
||||||
if [[ "$VERSION" == *"beta"* ]]; then
|
if [[ "$VERSION" == *"beta"* ]]; then
|
||||||
git switch beta
|
BASE_BRANCH=beta
|
||||||
else
|
|
||||||
git switch master
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
git switch "${BASE_BRANCH}"
|
||||||
git pull
|
git pull
|
||||||
|
|
||||||
|
BRANCH=b${VERSION}
|
||||||
|
|
||||||
|
git branch "${BRANCH}"
|
||||||
|
git switch "${BRANCH}"
|
||||||
|
|
||||||
echo "Updating files with version ${VERSION}, date ${VERSION_DATE} and commit ${VERSION_COMMIT}"
|
echo "Updating files with version ${VERSION}, date ${VERSION_DATE} and commit ${VERSION_COMMIT}"
|
||||||
|
|
||||||
flatpak-node-generator npm ../trilium/package-lock.json
|
flatpak-node-generator npm ../trilium/package-lock.json
|
||||||
@ -45,4 +51,7 @@ git add ./com.github.zadam.trilium.metainfo.xml
|
|||||||
git add ./com.github.zadam.trilium.yml
|
git add ./com.github.zadam.trilium.yml
|
||||||
|
|
||||||
git commit -m "release $VERSION"
|
git commit -m "release $VERSION"
|
||||||
git push
|
git push --set-upstream origin "${BRANCH}"
|
||||||
|
|
||||||
|
gh pr create --fill -B "${BASE_BRANCH}"
|
||||||
|
gh pr merge --auto --merge --delete-branch
|
||||||
|
Loading…
x
Reference in New Issue
Block a user