mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-17 20:50:44 +00:00
updated snapshot version, improved end of sprint script
This commit is contained in:
@ -1 +1 @@
|
||||
<revision>0.11.0</revision>
|
||||
0.11.0
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
############################################################################
|
||||
## Script to run the release process on qqq at the end of a sprint.
|
||||
## It's a good idea to run it from a fresh clone, but that's not strictly needed.
|
||||
## Uses gum for CLI UI.
|
||||
############################################################################
|
||||
|
||||
@ -24,9 +23,22 @@ function gumConfirmProceed
|
||||
fi
|
||||
}
|
||||
|
||||
QQQ_RELEASE_DIR=/tmp/qqq-release
|
||||
QQQ_DEV_TOOLS_DIR=${}QQQ_RELEASE_DIR}/qqq/qqq-dev-tools
|
||||
|
||||
mkdir -p $QQQ_RELEASE_DIR/qqq
|
||||
cd $QQQ_RELEASE_DIR/qqq || exit
|
||||
gumBanner "Making sure you have a clean git checkout"
|
||||
git status
|
||||
gumConfirmProceed "Can we Proceed, or do you need to clean up your checkout (git stash -u)?" "Proceed" "I need to clean up my checkout"
|
||||
git status 2>&1 > /dev/null 2>&1
|
||||
if [ "$?" != "0" ]; then
|
||||
gumConfirmProceed "No git checkout found, create a clean checkout at [$QQQ_RELEASE_DIR]?" "Proceed" "No, please quit"
|
||||
cd $QQQ_RELEASE_DIR || exit
|
||||
git clone git@github.com:Kingsrook/qqq.git
|
||||
git clone git@github.com:Kingsrook/qqq-frontend-material-dashboard.git
|
||||
git clone git@github.com:Kingsrook/qqq-frontend-core.git
|
||||
else
|
||||
gumConfirmProceed "Existing git checkouts found at [$QQQ_RELEASE_DIR], continue?" "Yes, use those" "I need to go delete it and start over"
|
||||
fi
|
||||
|
||||
gumBanner "Checking for open PR's..."
|
||||
gh pr list
|
||||
@ -38,17 +50,16 @@ git checkout main && git pull && git checkout dev && git pull
|
||||
if [ ! -e "qqq-sample-project/.env" ]; then
|
||||
dir=$(realpath .)
|
||||
gumBanner "Installing .env file -- for qqq" "Tell it your qqq is at:" "$dir"
|
||||
setup-environments.sh --qqq --quiet
|
||||
setup-environments.sh --qqq --quiet --is-for-release
|
||||
fi
|
||||
|
||||
###################################
|
||||
## go back to root qqq directory ##
|
||||
###################################
|
||||
cd ~/git/kingsrook/qqq/
|
||||
cd $QQQ_RELEASE_DIR/qqq || exit
|
||||
|
||||
MVN_VERIFY_LOG=/tmp/mvn-verify.log
|
||||
gumBanner "Doing clean build (logging to $MVN_VERIFY_LOG)"
|
||||
cp ~/git/kingsrook/qqq/qqq-sample-project/.env qqq-sample-project
|
||||
mvn clean verify > $MVN_VERIFY_LOG 2>&1
|
||||
tail -30 $MVN_VERIFY_LOG
|
||||
gumConfirmProceed "Can we Proceed, or are there build errors to fix?" "Proceed" "There are build errors to fix"
|
||||
@ -69,7 +80,7 @@ mvn gitflow:release-finish
|
||||
gumBanner "Updating qqq-dev-tools/CURRENT-SNAPSHOT-VERSION"
|
||||
CURRENT_SNAPSHOT_VERSION=$(grep '<revision>' pom.xml | sed 's/<.\?revision>//g;s/-SNAPSHOT//;s/ //g;')
|
||||
echo $CURRENT_SNAPSHOT_VERSION > $QQQ_DEV_TOOLS_DIR/CURRENT-SNAPSHOT-VERSION
|
||||
cd $QQQ_DEV_TOOLS_DIR
|
||||
cd $QQQ_DEV_TOOLS_DIR || exit
|
||||
git commit -m "Updating to $CURRENT_SNAPSHOT_VERSION" CURRENT-SNAPSHOT-VERSION
|
||||
git push
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
function usage()
|
||||
{
|
||||
echo "Usage: $0 [--nf-one|--qqq] [-q|--quiet]"
|
||||
echo "Usage: $0 [--nf-one|--qqq] [-q|--quiet] [-r|--is-for-release]"
|
||||
echo "By default, all environments are set up. Give an option to just do nf-one or qqq."
|
||||
exit 1;
|
||||
}
|
||||
@ -17,6 +17,7 @@ function usage()
|
||||
DO_NF_ONE=0
|
||||
DO_QQQ=0
|
||||
QUIET=0
|
||||
IS_FOR_RELEASE=0
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
DO_NF_ONE=1
|
||||
@ -29,6 +30,8 @@ else
|
||||
DO_QQQ=1
|
||||
elif [ "$arg" == "-q" -o "$arg" == "--quiet" ]; then
|
||||
QUIET=1
|
||||
elif [ "$arg" == "-r" -o "$arg" == "--is-for-release" ]; then
|
||||
IS_FOR_RELEASE=1
|
||||
else
|
||||
usage
|
||||
fi
|
||||
@ -144,10 +147,15 @@ function setupRepoEnvironment
|
||||
repoName=$1
|
||||
isNutrifreshOneRepo=$2
|
||||
|
||||
repoSearchRoot=${HOME}/git
|
||||
if [ "$IS_FOR_RELEASE" == "1" ]; then
|
||||
repoSearchRoot="/tmp/qqq-release"
|
||||
fi
|
||||
|
||||
#############################################################
|
||||
## try to automatically find the proper git repo directory ##
|
||||
#############################################################
|
||||
repoLocation=$(find ${HOME}/git -maxdepth 5 -type d -path "*${repoName}/.git" | sed 's/\/\.git//')
|
||||
repoLocation=$(find ${repoSearchRoot} -maxdepth 5 -type d -path "*${repoName}/.git" | sed 's/\/\.git//')
|
||||
|
||||
if [ "$repoLocation" != "" ]; then
|
||||
|
||||
|
Reference in New Issue
Block a user