Update release script (#2589)

This commit is contained in:
Devin Binnie
2023-03-06 15:22:01 -05:00
committed by GitHub
parent 99a84a0fd7
commit 2366214d9d

View File

@@ -22,9 +22,9 @@ function tag {
} }
function write_package_version { function write_package_version {
temp_file="$(mktemp -t package.json)" temp_file="$(mktemp -t package.json.XXXX)"
jq ".version = \"${1}\"" ./package.json > "${temp_file}" && mv "${temp_file}" ./package.json jq ".version = \"${1}\"" ./package.json > "${temp_file}" && mv "${temp_file}" ./package.json
temp_file="$(mktemp -t package-lock.json)" temp_file="$(mktemp -t package-lock.json.XXXX)"
jq ".version = \"${1}\"" ./package-lock.json > "${temp_file}" && mv "${temp_file}" ./package-lock.json jq ".version = \"${1}\"" ./package-lock.json > "${temp_file}" && mv "${temp_file}" ./package-lock.json
git add ./package.json ./package-lock.json git add ./package.json ./package-lock.json
@@ -39,8 +39,8 @@ trap 'last_command=$current_command; current_command=$BASH_COMMAND' DEBUG
trap 'echo "\"${last_command}\" command filed with exit code $?."' EXIT trap 'echo "\"${last_command}\" command filed with exit code $?."' EXIT
# mattermost repo might not be the origin one, we don't want to enforce that. # mattermost repo might not be the origin one, we don't want to enforce that.
org="github.com:mattermost" org="github.com:mattermost|https://github.com/mattermost"
git_origin="$(git remote -v | grep ${org} | grep push | awk '{print $1}')" git_origin="$(git remote -v | grep -E ${org} | grep push | awk '{print $1}')"
if [[ -z "${git_origin}" ]]; then if [[ -z "${git_origin}" ]]; then
print_warning "Can't find a mattermost remote, defaulting to origin" print_warning "Can't find a mattermost remote, defaulting to origin"
git_origin="origin" git_origin="origin"