feat: generate source archives

This commit is contained in:
Baptiste Augrain 2022-09-25 18:07:45 +02:00
parent 36c0f2a014
commit abbc2cb2f1
2 changed files with 14 additions and 0 deletions

View file

@ -54,6 +54,14 @@ contains() {
if [ "${VSCODIUM_ASSETS}" != "null" ]; then
# macos
if [[ "${OS_NAME}" == "osx" ]]; then
if [[ "${VSCODE_QUALITY}" == "insider" && "${VSCODE_ARCH}" == "arm64" ]]; then
if [[ -z $( contains "VSCodium-${RELEASE_VERSION}-src.tar.gz" ) || -z $( contains "VSCodium-${RELEASE_VERSION}-src.zip" ) ]]; then
echo "Building on MacOS because we have no SRC"
export SHOULD_BUILD="yes"
export SHOULD_BUILD_SRC="yes"
fi
fi
if [[ -z $( contains "VSCodium-darwin-${VSCODE_ARCH}-${RELEASE_VERSION}.zip" ) ]]; then
echo "Building on MacOS because we have no ZIP"
export SHOULD_BUILD="yes"
@ -348,3 +356,4 @@ echo "SHOULD_BUILD_REH=${SHOULD_BUILD_REH}" >> "${GITHUB_ENV}"
echo "SHOULD_BUILD_RPM=${SHOULD_BUILD_RPM}" >> "${GITHUB_ENV}"
echo "SHOULD_BUILD_TAR=${SHOULD_BUILD_TAR}" >> "${GITHUB_ENV}"
echo "SHOULD_BUILD_ZIP=${SHOULD_BUILD_ZIP}" >> "${GITHUB_ENV}"
echo "SHOULD_BUILD_SRC=${SHOULD_BUILD_SRC}" >> "${GITHUB_ENV}"

View file

@ -61,6 +61,11 @@ if [[ "${OS_NAME}" == "osx" ]]; then
popd
fi
if [[ "${SHOULD_BUILD_SRC}" == "yes" ]]; then
git archive --format tar.gz --output="./artifacts/VSCodium-${RELEASE_VERSION}-src.tar.gz" HEAD
git archive --format zip --output="./artifacts/VSCodium-${RELEASE_VERSION}-src.zip" HEAD
fi
VSCODE_PLATFORM="darwin"
elif [[ "${OS_NAME}" == "windows" ]]; then
cd vscode || { echo "'vscode' dir not found"; exit 1; }