vscodium/version.sh

20 lines
528 B
Bash
Raw Normal View History

2022-08-16 14:51:45 +03:00
#!/bin/bash
if [[ -z "${BUILD_SOURCEVERSION}" ]]; then
if type -t "sha1sum" > /dev/null 2>&1; then
2022-10-19 20:41:51 +03:00
export BUILD_SOURCEVERSION=$( echo "${RELEASE_VERSION/-*/}" | sha1sum | cut -d' ' -f1 )
else
npm install -g checksum
2022-10-19 20:41:51 +03:00
export BUILD_SOURCEVERSION=$( echo "${RELEASE_VERSION/-*/}" | checksum )
fi
2022-08-16 14:51:45 +03:00
echo "BUILD_SOURCEVERSION=\"${BUILD_SOURCEVERSION}\""
2022-08-16 14:51:45 +03:00
# for GH actions
if [[ "${GITHUB_ENV}" ]]; then
echo "BUILD_SOURCEVERSION=${BUILD_SOURCEVERSION}" >> "${GITHUB_ENV}"
2022-08-16 14:51:45 +03:00
fi
fi