2021-10-01 19:47:10 +03:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
npm install -g checksum
|
|
|
|
|
|
|
|
sum_file() {
|
2022-06-05 22:30:23 +03:00
|
|
|
if [[ -f "${1}" ]]; then
|
|
|
|
echo "Calcuating checksum for ${1}"
|
|
|
|
checksum -a sha256 "${1}" > "${1}".sha256
|
|
|
|
checksum "${1}" > "${1}".sha1
|
2021-10-01 19:47:10 +03:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
mkdir artifacts
|
|
|
|
|
|
|
|
if [[ "${OS_NAME}" == "osx" ]]; then
|
|
|
|
if [[ "${SHOULD_BUILD_ZIP}" != "no" ]]; then
|
|
|
|
echo "Building and moving ZIP"
|
|
|
|
cd "VSCode-darwin-${VSCODE_ARCH}"
|
2022-08-16 14:51:45 +03:00
|
|
|
zip -r -X -y "../artifacts/VSCodium-darwin-${VSCODE_ARCH}-${RELEASE_VERSION}.zip" ./*.app
|
2021-10-01 19:47:10 +03:00
|
|
|
cd ..
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ "${SHOULD_BUILD_DMG}" != "no" ]]; then
|
|
|
|
echo "Building and moving DMG"
|
|
|
|
pushd "VSCode-darwin-${VSCODE_ARCH}"
|
|
|
|
npx create-dmg VSCodium.app ..
|
2022-08-16 20:00:11 +03:00
|
|
|
mv "../VSCodium ${MS_TAG}.dmg" "../artifacts/VSCodium.${VSCODE_ARCH}.${RELEASE_VERSION}.dmg"
|
2021-10-01 19:47:10 +03:00
|
|
|
popd
|
|
|
|
fi
|
2022-06-08 17:59:06 +03:00
|
|
|
|
|
|
|
VSCODE_PLATFORM="darwin"
|
2021-10-01 19:47:10 +03:00
|
|
|
elif [[ "${OS_NAME}" == "windows" ]]; then
|
|
|
|
if [[ "${SHOULD_BUILD_ZIP}" != "no" ]]; then
|
|
|
|
echo "Moving ZIP"
|
2022-08-16 14:51:45 +03:00
|
|
|
mv "vscode\\.build\\win32-${VSCODE_ARCH}\\archive\\VSCode-win32-${VSCODE_ARCH}.zip" "artifacts\\VSCodium-win32-${VSCODE_ARCH}-${RELEASE_VERSION}.zip"
|
2021-10-01 19:47:10 +03:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ "${SHOULD_BUILD_EXE_SYS}" != "no" ]]; then
|
|
|
|
echo "Moving System EXE"
|
2022-08-16 14:51:45 +03:00
|
|
|
mv "vscode\\.build\\win32-${VSCODE_ARCH}\\system-setup\\VSCodeSetup.exe" "artifacts\\VSCodiumSetup-${VSCODE_ARCH}-${RELEASE_VERSION}.exe"
|
2021-10-01 19:47:10 +03:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ "${SHOULD_BUILD_EXE_USR}" != "no" ]]; then
|
|
|
|
echo "Moving User EXE"
|
2022-08-16 14:51:45 +03:00
|
|
|
mv "vscode\\.build\\win32-${VSCODE_ARCH}\\user-setup\\VSCodeSetup.exe" "artifacts\\VSCodiumUserSetup-${VSCODE_ARCH}-${RELEASE_VERSION}.exe"
|
2021-10-01 19:47:10 +03:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ "${VSCODE_ARCH}" == "ia32" || "${VSCODE_ARCH}" == "x64" ]]; then
|
|
|
|
if [[ "${SHOULD_BUILD_MSI}" != "no" ]]; then
|
|
|
|
echo "Moving MSI"
|
2022-08-16 14:51:45 +03:00
|
|
|
mv "build\\windows\\msi\\releasedir\\VSCodium-${VSCODE_ARCH}-${RELEASE_VERSION}.msi" artifacts/
|
2021-10-01 19:47:10 +03:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ "${SHOULD_BUILD_MSI_NOUP}" != "no" ]]; then
|
|
|
|
echo "Moving MSI with disabled updates"
|
2022-08-16 14:51:45 +03:00
|
|
|
mv "build\\windows\\msi\\releasedir\\VSCodium-${VSCODE_ARCH}-updates-disabled-${RELEASE_VERSION}.msi" artifacts/
|
2021-10-01 19:47:10 +03:00
|
|
|
fi
|
|
|
|
fi
|
2022-06-08 17:59:06 +03:00
|
|
|
|
|
|
|
VSCODE_PLATFORM="win32"
|
2021-10-01 19:47:10 +03:00
|
|
|
else
|
|
|
|
if [[ "${SHOULD_BUILD_TAR}" != "no" ]]; then
|
|
|
|
echo "Building and moving TAR"
|
2022-06-05 22:30:23 +03:00
|
|
|
cd "VSCode-linux-${VSCODE_ARCH}"
|
2022-08-16 14:51:45 +03:00
|
|
|
tar czf "../artifacts/VSCodium-linux-${VSCODE_ARCH}-${RELEASE_VERSION}.tar.gz" .
|
2021-10-01 19:47:10 +03:00
|
|
|
cd ..
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ "${SHOULD_BUILD_DEB}" != "no" ]]; then
|
|
|
|
echo "Moving DEB"
|
|
|
|
mv vscode/.build/linux/deb/*/deb/*.deb artifacts/
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ "${SHOULD_BUILD_RPM}" != "no" ]]; then
|
|
|
|
echo "Moving RPM"
|
|
|
|
mv vscode/.build/linux/rpm/*/*.rpm artifacts/
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ "${SHOULD_BUILD_APPIMAGE}" != "no" ]]; then
|
|
|
|
echo "Moving AppImage"
|
|
|
|
mv build/linux/appimage/out/*.AppImage* artifacts/
|
|
|
|
fi
|
2022-06-08 17:59:06 +03:00
|
|
|
|
|
|
|
VSCODE_PLATFORM="linux"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ "${SHOULD_BUILD_REH}" != "no" ]]; then
|
|
|
|
echo "Building and moving REH"
|
|
|
|
cd "vscode-reh-${VSCODE_PLATFORM}-${VSCODE_ARCH}"
|
2022-08-16 14:51:45 +03:00
|
|
|
tar czf "../artifacts/vscodium-reh-${VSCODE_PLATFORM}-${VSCODE_ARCH}-${RELEASE_VERSION}.tar.gz" .
|
2022-06-08 17:59:06 +03:00
|
|
|
cd ..
|
2021-10-01 19:47:10 +03:00
|
|
|
fi
|
|
|
|
|
|
|
|
cd artifacts
|
|
|
|
|
|
|
|
for FILE in *
|
|
|
|
do
|
|
|
|
if [[ -f "${FILE}" ]]; then
|
|
|
|
sum_file "${FILE}"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
cd ..
|