From d3b7bab5128b4978fe182478fbe2d19779eda06c Mon Sep 17 00:00:00 2001 From: Distopico Vegan Date: Tue, 20 Nov 2018 02:23:20 -0500 Subject: [PATCH] update prepare script --- .releaserc.yml | 2 +- scripts/prepare.sh | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100755 scripts/prepare.sh diff --git a/.releaserc.yml b/.releaserc.yml index ea85ca34..5103c16a 100644 --- a/.releaserc.yml +++ b/.releaserc.yml @@ -3,7 +3,7 @@ plugins: - "@semantic-release/release-notes-generator" - "@semantic-release/changelog" - - "@semantic-release/exec" - - prepareCmd: 'VERSIONCODE=`grep "versionCode .*" app/build.gradle | sed "s/versionCode //"` && sed -i "s/versionCode .*$/versionCode $(($VERSIONCODE + 1))/; s/versionName .*$/versionName \"${nextRelease.version}"/" app/build.gradle' + - prepareCmd: './scripts/prepare.sh ${nextRelease.version}' - - "@semantic-release/git" - assets: - CHANGELOG.md diff --git a/scripts/prepare.sh b/scripts/prepare.sh new file mode 100755 index 00000000..3438d517 --- /dev/null +++ b/scripts/prepare.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +FILE="app/build.gradle" +VERSIONCODE=`grep "versionCode .*" $FILE | sed "s/versionCode //"` +sed -i "s/versionCode .*$/versionCode $(($VERSIONCODE + 1))/; s/versionName .*$/versionName \"$1\"/" $FILE