Update release script (#2589)
This commit is contained in:
@@ -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"
|
||||||
|
Reference in New Issue
Block a user