From 70adb4a1f6c7725f83ae743b3ee42d9c60be4e40 Mon Sep 17 00:00:00 2001 From: SamTV12345 <40429738+samtv12345@users.noreply.github.com> Date: Sun, 24 Dec 2023 20:36:56 +0100 Subject: [PATCH] Reworked relase script. --- src/bin/push-after-release.sh | 16 ++++++++++++++++ src/bin/release.js | 7 +++---- 2 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 src/bin/push-after-release.sh diff --git a/src/bin/push-after-release.sh b/src/bin/push-after-release.sh new file mode 100644 index 00000000..8781196f --- /dev/null +++ b/src/bin/push-after-release.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +# Specify the path to your package.json file +PACKAGE_JSON_PATH="./src//package.json" + +# Check if the file exists +if [ ! -f "$PACKAGE_JSON_PATH" ]; then + echo "Error: package.json not found in the specified path." + exit 1 +fi + +# Read the version from package.json into a variable +VERSION=$(jq -r '.version' "$PACKAGE_JSON_PATH") +git push origin master develop $VERSION +git push --tags +(cd ../ether.github.com && git push) \ No newline at end of file diff --git a/src/bin/release.js b/src/bin/release.js index d6cc3a97..ee5f245e 100644 --- a/src/bin/release.js +++ b/src/bin/release.js @@ -207,11 +207,10 @@ console.log(' git log --graph --date-order --boundary --oneline --decorate deve console.log(` git show '${newVersion}'`); console.log(' (cd ../ether.github.com && git show)'); console.log('If everything looks good then push:'); -console.log(` git push origin master develop '${newVersion}'`); -console.log(' (cd ../ether.github.com && git push)'); +console.log('Run ./bin/push-after-release.sh'); console.log('Creating a Windows build is not necessary anymore and will be created by GitHub action'); -console.log('Visit https://github.com/ether/etherpad-lite/releases/new and create a new release ' + - `with 'master' as the target and the version is ${newVersion}. `); +console.log('After the windows binary is created a new release with the set version is created automatically.' + + ' Just paste the release notes in there'); console.log('The docs are updated automatically with the new version. While the windows build' + ' is generated people can still download the older versions.'); console.log('Finally go public with an announcement via our comms channels :)');