mattermost-desktop/scripts/cp_artifacts.sh
Devin Binnie 8834720cb4
Some checks failed
release / build-mac-installer (push) Has been cancelled
release / begin-notification (push) Has been cancelled
release / build-linux (push) Has been cancelled
release / build-msi-installer (push) Has been cancelled
release / upload-to-s3 (push) Has been cancelled
release / github-release (push) Has been cancelled
release / end-notification (push) Has been cancelled
[MM-58286] Fix cp_artifacts to avoid weird naming changes (#3037)
2024-05-16 16:45:52 -04:00

21 lines
424 B
Bash
Executable file

#!/usr/bin/env bash
set -eu
VERSION="$(jq -r '.version' <package.json)"
SRC="${1}"
DEST="${2}"
if [[ ! -d "${DEST}/${VERSION}" ]]; then
echo "Can't find destination. Creating \"${DEST}/${VERSION}\""
mkdir -p "${DEST}/${VERSION}"
fi
if [[ ! -d "${SRC}/${VERSION}" ]]; then
echo "Can't find source directory, exiting."
exit 1
fi
cp -rv "${SRC}/${VERSION}" "${DEST}/"
cp -v "${SRC}"/*.yml "${DEST}/"
exit 0