Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions release/build-and-sign.sh
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,9 @@ option_parse()
exit 1
fi
fi

mkdir -p "${LOGDIR}"

}

makearelease()
Expand All @@ -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
Expand All @@ -223,7 +224,7 @@ makearelease()
mvn --batch-mode site site:stage </dev/null
}

function signartifacts
signartifacts()
{
declare i
declare ret
Expand Down Expand Up @@ -272,6 +273,8 @@ startgpgagent
makearelease
releaseret=$?

signartifacts

stopgpgagent

if [[ ${releaseret} == 0 ]]; then
Expand Down
16 changes: 13 additions & 3 deletions release/initial-patches.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -76,7 +83,7 @@ option_parse()
}

docker_run() {
docker run -i \
docker run -i --rm \
-v "${PWD}:/src" \
-v "${HOME}/.m2:${HOME}/.m2" \
-u "${USER_ID}" \
Expand All @@ -89,6 +96,7 @@ docker_run() {
cleanup() {
git checkout --force "${STARTING_BRANCH}"
git branch -D "${JIRAISSUE}-release"
git branch -D "${JIRAISSUE}-release"
exit 1
}

Expand Down Expand Up @@ -125,7 +133,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')
}

Expand Down Expand Up @@ -155,9 +163,11 @@ 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}"
git commit -a -m "${JIRAISSUE}. Bump main version to ${NEW_MAIN_VERSION}"

fi

git checkout "${JIRAISSUE}-release"
Expand Down