From e73b055618c834525c7dc25921bee2d6828e9bf2 Mon Sep 17 00:00:00 2001 From: Allen Wittenauer Date: Thu, 22 Oct 2020 08:05:10 -0700 Subject: [PATCH 1/5] new release script fixes --- release/initial-patches.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/release/initial-patches.sh b/release/initial-patches.sh index 861e2ba11..98a5310c8 100755 --- a/release/initial-patches.sh +++ b/release/initial-patches.sh @@ -27,6 +27,13 @@ if [[ ! -d precommit ]]; then exit 1 fi +SYSTEM=$(uname -s) +if [[ "${SYSTEM}" == Darwin ]]; then + SEDI=("-i" '') +else + SEDI=("-i") +fi + #shellcheck source=precommit/src/main/shell/core.d/00-yetuslib.sh . precommit/src/main/shell/core.d/00-yetuslib.sh @@ -125,7 +132,7 @@ update_version() { # *MOST* systems have sed -i these days while read -r file; do - sed -i "s,${oldversion},${newversion},g" "${file}" + sed "${SEDI[@]}" "s,${oldversion},${newversion},g" "${file}" done < <( find . -name 'pom.xml') } @@ -155,7 +162,7 @@ update_version "${OLD_BRANCH_VERSION}" "${NEW_BRANCH_VERSION}" git commit -a -m "${JIRAISSUE}. Stage version ${NEW_BRANCH_VERSION}" if [[ -n "${NEW_MAIN_VERSION}" ]]; then - + git checkout --force main git checkout -b "${JIRAISSUE}-${STARTING_BRANCH}" update_version "${OLD_BRANCH_VERSION}" "${NEW_MAIN_VERSION}" fi From f694a62b5a0ec523adbef78a65697357990d2fcf Mon Sep 17 00:00:00 2001 From: Allen Wittenauer Date: Thu, 22 Oct 2020 08:08:50 -0700 Subject: [PATCH 2/5] fixup! new release script fixes --- release/initial-patches.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/release/initial-patches.sh b/release/initial-patches.sh index 98a5310c8..552633774 100755 --- a/release/initial-patches.sh +++ b/release/initial-patches.sh @@ -165,6 +165,8 @@ if [[ -n "${NEW_MAIN_VERSION}" ]]; then git checkout --force main git checkout -b "${JIRAISSUE}-${STARTING_BRANCH}" update_version "${OLD_BRANCH_VERSION}" "${NEW_MAIN_VERSION}" + git commit -a -m "${JIRAISSUE}. Bump main version to ${NEW_BRANCH_VERSION}" + fi git checkout "${JIRAISSUE}-release" From f664f3e2f17583759241cb414b7496ba1f069cbd Mon Sep 17 00:00:00 2001 From: Allen Wittenauer Date: Thu, 22 Oct 2020 08:09:45 -0700 Subject: [PATCH 3/5] fixup! new release script fixes --- release/initial-patches.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/release/initial-patches.sh b/release/initial-patches.sh index 552633774..8ee1e0ad9 100755 --- a/release/initial-patches.sh +++ b/release/initial-patches.sh @@ -96,6 +96,7 @@ docker_run() { cleanup() { git checkout --force "${STARTING_BRANCH}" git branch -D "${JIRAISSUE}-release" + git branch -D "${JIRAISSUE}-release" exit 1 } From 4d3b5e8d0f912b257acd03eaf6f3d852be87b96e Mon Sep 17 00:00:00 2001 From: Allen Wittenauer Date: Thu, 22 Oct 2020 08:13:13 -0700 Subject: [PATCH 4/5] fixup! new release script fixes --- release/initial-patches.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/initial-patches.sh b/release/initial-patches.sh index 8ee1e0ad9..a249bc8cf 100755 --- a/release/initial-patches.sh +++ b/release/initial-patches.sh @@ -166,7 +166,7 @@ if [[ -n "${NEW_MAIN_VERSION}" ]]; then git checkout --force main git checkout -b "${JIRAISSUE}-${STARTING_BRANCH}" update_version "${OLD_BRANCH_VERSION}" "${NEW_MAIN_VERSION}" - git commit -a -m "${JIRAISSUE}. Bump main version to ${NEW_BRANCH_VERSION}" + git commit -a -m "${JIRAISSUE}. Bump main version to ${NEW_MAIN_VERSION}" fi From e78743a19a2455ab55c33a3e6409fcd2fc6c7e81 Mon Sep 17 00:00:00 2001 From: Allen Wittenauer Date: Thu, 22 Oct 2020 09:15:54 -0700 Subject: [PATCH 5/5] fixup! new release script fixes --- release/build-and-sign.sh | 9 ++++++--- release/initial-patches.sh | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/release/build-and-sign.sh b/release/build-and-sign.sh index 9b0326bea..d309398ce 100755 --- a/release/build-and-sign.sh +++ b/release/build-and-sign.sh @@ -179,6 +179,9 @@ option_parse() exit 1 fi fi + + mkdir -p "${LOGDIR}" + } makearelease() @@ -196,8 +199,6 @@ makearelease() # let's start at the root pushd "${BASEDIR}" >/dev/null || exit 1 - mkdir -p "${LOGDIR}" - big_console_header "Cleaning the Source Tree" # git clean to clear any remnants from previous build @@ -223,7 +224,7 @@ makearelease() mvn --batch-mode site site:stage