From 18f6fb207625733fcd05717e248007a09e357485 Mon Sep 17 00:00:00 2001 From: Florian Steffens Date: Thu, 14 Sep 2023 21:50:53 +0200 Subject: [PATCH 1/2] add initial release script Signed-off-by: Florian Steffens --- release.sh | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100755 release.sh diff --git a/release.sh b/release.sh new file mode 100755 index 000000000..6415208e8 --- /dev/null +++ b/release.sh @@ -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 From ee7828227748bd1134263b67ec7559cd411c08ae Mon Sep 17 00:00:00 2001 From: Florian Steffens Date: Fri, 15 Sep 2023 11:04:39 +0200 Subject: [PATCH 2/2] add directory for scripts - move existing ones - exclude from app shipping Signed-off-by: Florian Steffens --- .nextcloudignore | 3 ++- release.sh => .scripts/release.sh | 0 2 files changed, 2 insertions(+), 1 deletion(-) rename release.sh => .scripts/release.sh (100%) diff --git a/.nextcloudignore b/.nextcloudignore index 5966bddbf..2c8756c6d 100644 --- a/.nextcloudignore +++ b/.nextcloudignore @@ -35,4 +35,5 @@ phpunit.xml psalm.xml stylelint.config.js webpack.js -releaseNotes.md \ No newline at end of file +releaseNotes.md +/.scripts diff --git a/release.sh b/.scripts/release.sh similarity index 100% rename from release.sh rename to .scripts/release.sh