From 32c80d8b6f4f425f4124537bef24e2d805b39192 Mon Sep 17 00:00:00 2001 From: MatMoul Date: Sat, 16 Mar 2024 23:22:00 +0100 Subject: [PATCH] Add code --- fullupgrade | 5 +++++ makerelease.sh | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100755 fullupgrade create mode 100755 makerelease.sh diff --git a/fullupgrade b/fullupgrade new file mode 100755 index 0000000..2b10b51 --- /dev/null +++ b/fullupgrade @@ -0,0 +1,5 @@ +#!/bin/bash + +pacman -Syu --noconfirm +pacman -Rns "$(pacman -Qqtd)" --noconfirm +pacman -Sc --noconfirm diff --git a/makerelease.sh b/makerelease.sh new file mode 100755 index 0000000..b0d6b33 --- /dev/null +++ b/makerelease.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +declare -r VERSION=${1} +declare -r MESSAGE=${2} +declare -r TAGBRANCH=main +declare CURRENTBRANCH="" + +showHelp() { + echo makerelease version +} + +if [ "${VERSION}" == "" ]; then + showHelp + echo "" + echo "no version provided!" + exit 1 +fi + +CURRENTBRANCH=$(git rev-parse --abbrev-ref HEAD) + +if [ ! "${CURRENTBRANCH}" == "dev" ]; then + echo "You are not in dev branch!" + echo "Use dev branch to make a release!" + exit 1 +fi + +git checkout "${TAGBRANCH}" +git merge "${CURRENTBRANCH}" +git push +git tag -a "${VERSION}" -m "${MESSAGE}" +git push --tags +git checkout "${CURRENTBRANCH}"