Skip to content

Commit

Permalink
add initial release script
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>
  • Loading branch information
Florian Steffens committed Sep 14, 2023
1 parent 1cf37a0 commit 002945d
Showing 1 changed file with 85 additions and 0 deletions.
85 changes: 85 additions & 0 deletions release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
#!/usr/bin/env bash

echo
echo "🚀 Lets make a new release!"
echo "==========================="

echo
echo "Preparation steps:"
echo " - krankerl is installed"
echo " - Sign keys are under '~/.nextcloud'"
echo
echo " - All code changes are committed and merged"
echo " - CI is green"
echo
echo " - Version number bumped"
echo " - File 'releaseNotes.md' is up to date"
echo " - Update screenshots if needed"
echo
read -r -p "Are all the prepare steps done? [y/N] " CONFIRMATION

if [[ "$CONFIRMATION" == "n" || "$CONFIRMATION" == "N" || -z "$CONFIRMATION" ]]; then
echo
echo "Aboard, please prepare carefully."
exit 1
fi

echo
read -r -p "Give me the release name (eg 'v0.6.0' or 'v0.6.0-beta.1'): " NAME

if [[ -z "$NAME" ]]; then
echo
echo "🙄 Aboard, you have to give me a name."
exit 1
fi

echo
echo "# Build package"
echo "krankerl package"
echo "========================="
krankerl package

echo
echo "# create tag for this release"
echo "git tag -a $NAME -m '$NAME'"
echo "========================="
git tag -a "$NAME" -m "$NAME"

echo
echo "# push tag to repo origin"
echo "git push -u origin $NAME"
echo "========================="
git push -u origin "$NAME"

echo
echo "# push tag to repo releases"
echo "git push -u releases $NAME"
echo "========================="
git push -u releases "$NAME"

echo
echo "# publish at github repo origin"
echo "gh release --repo nextcloud/tables create '$NAME' ./build/artifacts/tables.tar.gz --notes-file releaseNotes.md -t 'Nextcloud tables $NAME'"
echo "========================="
gh release --repo nextcloud/tables create "$NAME" ./build/artifacts/tables.tar.gz --notes-file releaseNotes.md -t "Nextcloud tables $NAME"

echo
echo "# publish at github repo releases"
echo "gh release --repo nextcloud-releases/tables create '$NAME' ./build/artifacts/tables.tar.gz --notes-file releaseNotes.md -t 'Nextcloud tables $NAME'"
echo "========================="
gh release --repo nextcloud-releases/tables create "$NAME" ./build/artifacts/tables.tar.gz --notes-file releaseNotes.md -t "Nextcloud tables $NAME"


echo
echo "# publish at appstore"
echo "krankerl publish https://github.com/nextcloud-releases/tables/releases/download/$NAME/tables.tar.gz"
echo "========================="
bash -c "krankerl publish https://github.com/nextcloud-releases/tables/releases/download/$NAME/tables.tar.gz"

echo
echo "Maybe you should create a stable-branch..."

echo
echo "🍻 Cheers"
echo
exit 1

0 comments on commit 002945d

Please sign in to comment.