From 589656558b0a145a444b3e6729db19ed4b204f2c Mon Sep 17 00:00:00 2001 From: Core <64542347+coredev-uk@users.noreply.github.com> Date: Thu, 19 May 2022 23:32:18 +0100 Subject: [PATCH] version updater script --- resources/version.sh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 resources/version.sh diff --git a/resources/version.sh b/resources/version.sh new file mode 100755 index 00000000..5daefd13 --- /dev/null +++ b/resources/version.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +LATESTSHA=$(curl -s https://api.github.com/repos/ciderapp/Cider/branches/stable | grep sha | cut -d '"' -f 4 | sed 's/v//' | xargs) +COMMITSINCESTABLE=$(git rev-list $LATESTSHA..HEAD --count) +VERSION=$(grep '"version":.*' package.json | cut -d '"' -f 4 | head -1) +echo +NEWVERSION=${VERSION/-/.}.$COMMITSINCESTABLE +npm version $NEWVERSION \ No newline at end of file