mirror of
https://github.com/zadam/trilium.git
synced 2025-01-24 07:59:08 +08:00
release scripts fixes
This commit is contained in:
parent
29fd78aee5
commit
87e7828440
2 changed files with 20 additions and 8 deletions
|
@ -1,7 +1,5 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
echo 'module.exports = { build_date:"'`date --iso-8601=seconds`'", build_revision: "'`git log -1 --format="%H"`'" };' > services/build.js
|
||||
|
||||
echo "Deleting dist"
|
||||
|
||||
rm -r dist/*
|
||||
|
|
|
@ -18,35 +18,49 @@ if ! git diff-index --quiet HEAD --; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
echo "Releasing Trilium $VERSION"
|
||||
|
||||
jq '.version = "'$VERSION'"' package.json|sponge package.json
|
||||
|
||||
echo 'module.exports = { build_date:"'`date --iso-8601=seconds`'", build_revision: "'`git log -1 --format="%H"`'" };' > services/build.js
|
||||
|
||||
TAG=v$VERSION
|
||||
|
||||
git commit -m "$VERSION"
|
||||
echo "Committing package.json version change"
|
||||
|
||||
git commit -m "release $VERSION"
|
||||
git push
|
||||
|
||||
echo "Tagging commit with $TAG"
|
||||
|
||||
git tag $TAG
|
||||
git push origin $TAG
|
||||
|
||||
echo "Releasing Trilium $VERSION"
|
||||
bin/build.sh
|
||||
|
||||
build
|
||||
|
||||
package
|
||||
bin/package.sh
|
||||
|
||||
LINUX_BUILD=trilium-linux-$VERSION.7z
|
||||
WINDOWS_BUILD=trilium-windows-$VERSION.7z
|
||||
|
||||
echo "Creating release in GitHub"
|
||||
|
||||
github-release release \
|
||||
--tag $TAG \
|
||||
--name "$TAG release"
|
||||
|
||||
echo "Uploading linux build"
|
||||
|
||||
github-release upload \
|
||||
--tag $TAG \
|
||||
--name "$LINUX_BUILD" \
|
||||
--file "dist/$LINUX_BUILD"
|
||||
|
||||
echo "Uploading windows build"
|
||||
|
||||
github-release upload \
|
||||
--tag $TAG \
|
||||
--name "$WINDOWS_BUILD" \
|
||||
--file "dist/$WINDOWS_BUILD"
|
||||
--file "dist/$WINDOWS_BUILD"
|
||||
|
||||
echo "Release finished!"
|
Loading…
Reference in a new issue