Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add initial release script #568

Merged
merged 2 commits into from
Sep 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .nextcloudignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,5 @@ phpunit.xml
psalm.xml
stylelint.config.js
webpack.js
releaseNotes.md
releaseNotes.md
/.scripts
85 changes: 85 additions & 0 deletions .scripts/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