From 4de18fae52a037b547b90f17fef4cc79cd251efa Mon Sep 17 00:00:00 2001 From: Baptiste Augrain Date: Wed, 15 Nov 2023 22:41:07 +0100 Subject: [PATCH] build: add spearhead checking [skip ci] --- .github/workflows/stable-spearhead.yml | 1 + check_tags.sh | 24 ++++++++++-------------- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/.github/workflows/stable-spearhead.yml b/.github/workflows/stable-spearhead.yml index 78c189d4d78..87aeff5a6c0 100644 --- a/.github/workflows/stable-spearhead.yml +++ b/.github/workflows/stable-spearhead.yml @@ -39,6 +39,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NEW_RELEASE: ${{ github.event.inputs.new_release }} + IS_SPEARHEAD: 'yes' run: . check_tags.sh - name: Build diff --git a/check_tags.sh b/check_tags.sh index 58aeb1894cd..9dceb3e005c 100755 --- a/check_tags.sh +++ b/check_tags.sh @@ -48,16 +48,14 @@ contains() { } if [[ "${ASSETS}" != "null" ]]; then - # macos - if [[ "${OS_NAME}" == "osx" ]]; then - if [[ "${VSCODE_ARCH}" == "arm64" ]]; then - if [[ -z $( contains "${APP_NAME}-${RELEASE_VERSION}-src.tar.gz" ) || -z $( contains "${APP_NAME}-${RELEASE_VERSION}-src.zip" ) ]]; then - echo "Building on MacOS because we have no SRC" - export SHOULD_BUILD="yes" - export SHOULD_BUILD_SRC="yes" - fi + if [[ "${IS_SPEARHEAD}" == "yes" ]]; then + if [[ -z $( contains "${APP_NAME}-${RELEASE_VERSION}-src.tar.gz" ) || -z $( contains "${APP_NAME}-${RELEASE_VERSION}-src.zip" ) ]]; then + echo "Building because we have no SRC" + export SHOULD_BUILD="yes" + export SHOULD_BUILD_SRC="yes" fi - + # macos + elif [[ "${OS_NAME}" == "osx" ]]; then if [[ -z $( contains "${APP_NAME}-darwin-${VSCODE_ARCH}-${RELEASE_VERSION}.zip" ) ]]; then echo "Building on MacOS because we have no ZIP" export SHOULD_BUILD="yes" @@ -345,7 +343,9 @@ if [[ "${ASSETS}" != "null" ]]; then fi fi else - if [[ "${OS_NAME}" == "linux" ]]; then + if [[ "${IS_SPEARHEAD}" == "yes" ]]; then + export SHOULD_BUILD_SRC="yes" + elif [[ "${OS_NAME}" == "linux" ]]; then if [[ "${VSCODE_ARCH}" == "ppc64le" ]]; then SHOULD_BUILD_DEB="no" SHOULD_BUILD_APPIMAGE="no" @@ -354,10 +354,6 @@ else elif [[ "${VSCODE_ARCH}" != "x64" ]]; then export SHOULD_BUILD_APPIMAGE="no" fi - elif [[ "${OS_NAME}" == "osx" ]]; then - if [[ "${VSCODE_ARCH}" == "arm64" ]]; then - export SHOULD_BUILD_SRC="yes" - fi elif [[ "${OS_NAME}" == "windows" ]]; then if [[ "${VSCODE_ARCH}" == "arm64" ]]; then export SHOULD_BUILD_REH="no"