[MM-19051] [MM-14180] [MM-19330] Release helpers, push to github and aws, fix weird name on msi at UAC (#1063)
* [MM-19051] release helpers * [MM-14180] release to github [MM-18330] more release helpers * [MM-19330] add proper name during uac * [MM-19051] address CR comments * add this branch fo testing * missing commits, remove trap to prevent ugly output * Run shellcheck against Bash scripts to fix issues * Try to fix build - attempt 1 * Add patch option to release script * add setup exe installer to generate_release script
This commit is contained in:
@@ -1,47 +1,49 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eu
|
||||
|
||||
VERSION=$(cat package.json | jq -r '.version')
|
||||
VERSION="$(jq -r '.version' <package.json)"
|
||||
SRC="${1}"
|
||||
DEST="${2}"
|
||||
SOMETHING_COPIED=0
|
||||
if [[ ! -d "${DEST}" ]]; then
|
||||
echo "Can't find destination. Creating ${DEST}"
|
||||
mkdir -p ${DEST}
|
||||
echo "Can't find destination. Creating \"${DEST}\""
|
||||
mkdir -p "${DEST}"
|
||||
fi
|
||||
|
||||
if [[ -f "${SRC}/mattermost-desktop-${VERSION}-win-ia32.zip" ]]; then
|
||||
echo "Copying Win32\n"
|
||||
echo -e "Copying Win32\n"
|
||||
cp "${SRC}/mattermost-desktop-${VERSION}-win-ia32.zip" "${DEST}/mattermost-desktop-${VERSION}-win32.zip"
|
||||
SOMETHING_COPIED=1
|
||||
fi
|
||||
if [[ -f "${SRC}/mattermost-desktop-${VERSION}-win-x64.zip" ]]; then
|
||||
echo "Copying Win64\n"
|
||||
echo -e "Copying Win64\n"
|
||||
cp "${SRC}/mattermost-desktop-${VERSION}-win-x64.zip" "${DEST}/mattermost-desktop-${VERSION}-win64.zip"
|
||||
SOMETHING_COPIED=$(($SOMETHING_COPIED + 2))
|
||||
SOMETHING_COPIED=$((SOMETHING_COPIED + 2))
|
||||
fi
|
||||
if [[ -f "${SRC}/mattermost-desktop-setup-${VERSION}-win.exe" ]]; then
|
||||
echo "Copying win-no-arch\n"
|
||||
cp "${SRC}/mattermost-desktop-setup-${VERSION}-win.exe" "${DEST}/"
|
||||
SOMETHING_COPIED=$(($SOMETHING_COPIED + 4))
|
||||
fi
|
||||
if [[ -f "${SRC}"/mattermost-desktop-${VERSION}-mac.zip ]]; then
|
||||
echo "Copying mac\n"
|
||||
# We are not supplying this since we supply the msi
|
||||
# if [[ -f "${SRC}/mattermost-desktop-setup-${VERSION}-win.exe" ]]; then
|
||||
# echo -e "Copying win-no-arch\n"
|
||||
# cp "${SRC}/mattermost-desktop-setup-${VERSION}-win.exe" "${DEST}/"
|
||||
# SOMETHING_COPIED=$((SOMETHING_COPIED + 4))
|
||||
# fi
|
||||
if [[ -f "${SRC}/mattermost-desktop-${VERSION}-mac.zip" ]]; then
|
||||
echo -e "Copying mac\n"
|
||||
cp "${SRC}"/mattermost-desktop-*-mac.* "${DEST}/"
|
||||
if [[ -f "${SRC}"/mattermost-desktop-${VERSION}-mac.dmg ]]; then
|
||||
cp "${SRC}"/*.blockmap "${DEST}/"
|
||||
fi
|
||||
SOMETHING_COPIED=$(($SOMETHING_COPIED + 8))
|
||||
SOMETHING_COPIED=$((SOMETHING_COPIED + 8))
|
||||
fi
|
||||
if [[ -f "${SRC}"/mattermost-desktop-${VERSION}-linux-x64.tar.gz ]]; then
|
||||
echo "Copying linux"
|
||||
echo -e "Copying linux\n"
|
||||
cp "${SRC}"/mattermost-desktop-*-linux-* "${DEST}/"
|
||||
SOMETHING_COPIED=$(($SOMETHING_COPIED + 16))
|
||||
SOMETHING_COPIED=$((SOMETHING_COPIED + 16))
|
||||
fi
|
||||
|
||||
if [[ $SOMETHING_COPIED -eq 0 ]]; then
|
||||
echo "didn't find anything to copy, seems like something failed"
|
||||
exit -1
|
||||
echo "Didn't find anything to copy, it seems like something failed"
|
||||
# Bash only returns 0-255 values
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cp "${SRC}"/*.yml "${DEST}/"
|
||||
|
Reference in New Issue
Block a user