From 17aae923c43f7ad0b5c8278a732e084ea794bdf2 Mon Sep 17 00:00:00 2001 From: emi~ Date: Sun, 12 Nov 2023 22:00:03 -0300 Subject: [PATCH] ci: fix version thing --- build.sh | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/build.sh b/build.sh index 4d40d95..77719bc 100755 --- a/build.sh +++ b/build.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env sh +#!/usr/bin/env bash OLDPWD="$PWD" DIRNAME=$(dirname "$0") @@ -6,11 +6,7 @@ cd "$DIRNAME" ver=$(sed -n "s|^versionCode=||p" module.prop) name=$(sed -n "s|^name=||p" module.prop | sed "s| |-|g") -if [ .$1 == .github ]; then - newVerCode="$ver" -else - newVerCode=$((ver + 1)) -fi +newVerCode="$ver" newVersion=$(echo $newVerCode | \sed 's|\(.\)\(.\)\(.\)|\1\.\2\.\3|') sed --in-place "s|^versionCode=$ver|versionCode=$newVerCode|;s|^version=v.*|version=v$newVersion|" module.prop