From 59ad206f9e2b2fba7222753a6c38c0d249f11430 Mon Sep 17 00:00:00 2001 From: Baptiste Augrain Date: Wed, 10 Mar 2021 19:24:52 +0100 Subject: [PATCH] move build scripts --- .github/workflows/linux.yml | 2 ++ .github/workflows/macos.yml | 2 ++ .github/workflows/windows.yml | 2 ++ build/azure-pipelines/computeYarnCacheKey.js | 2 +- build/build_linux.sh | 8 ++++++++ {scripts => build}/build_macos.sh | 2 +- build/build_windows.ps1 | 15 +++++++++++++++ scripts/build_linux.sh | 8 -------- scripts/build_windows.sh | 8 -------- 9 files changed, 31 insertions(+), 18 deletions(-) create mode 100755 build/build_linux.sh rename {scripts => build}/build_macos.sh (96%) create mode 100755 build/build_windows.ps1 delete mode 100644 scripts/build_linux.sh delete mode 100644 scripts/build_windows.sh diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 87edc39..bea3e45 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -57,10 +57,12 @@ jobs: - name: Compute cache key id: yarnCacheKey run: echo "::set-output name=value::$(node build/azure-pipelines/computeYarnCacheKey.js)" + if: env.SHOULD_BUILD == 'yes' - name: Get yarn cache directory path id: yarnCacheDirPath run: echo "::set-output name=dir::$(yarn cache dir)" + if: env.SHOULD_BUILD == 'yes' - name: Cache yarn directory uses: actions/cache@v2 diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 4456ba0..fd5deeb 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -39,10 +39,12 @@ jobs: - name: Compute cache key id: yarnCacheKey run: echo "::set-output name=value::$(node build/azure-pipelines/computeYarnCacheKey.js)" + if: env.SHOULD_BUILD == 'yes' - name: Get yarn cache directory path id: yarnCacheDirPath run: echo "::set-output name=dir::$(yarn cache dir)" + if: env.SHOULD_BUILD == 'yes' - name: Cache yarn directory uses: actions/cache@v2 diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 898001f..43389f1 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -52,10 +52,12 @@ jobs: - name: Compute cache key id: yarnCacheKey run: echo "::set-output name=value::$(node build/azure-pipelines/computeYarnCacheKey.js)" + if: env.SHOULD_BUILD == 'yes' - name: Get yarn cache directory path id: yarnCacheDirPath run: echo "::set-output name=dir::$(yarn cache dir)" + if: env.SHOULD_BUILD == 'yes' - name: Cache yarn directory uses: actions/cache@v2 diff --git a/build/azure-pipelines/computeYarnCacheKey.js b/build/azure-pipelines/computeYarnCacheKey.js index f275804..7397d45 100644 --- a/build/azure-pipelines/computeYarnCacheKey.js +++ b/build/azure-pipelines/computeYarnCacheKey.js @@ -21,4 +21,4 @@ for (let i = 2; i < process.argv.length; i++) { shasum.update(process.argv[i]); } -process.stdout.write(shasum.digest('hex')); \ No newline at end of file +process.stdout.write(shasum.digest('hex')); diff --git a/build/build_linux.sh b/build/build_linux.sh new file mode 100755 index 0000000..e9a58cf --- /dev/null +++ b/build/build_linux.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +rm -rf VSCode* +rm -rf vscode + +./get_repo.sh + +SHOULD_BUILD=yes CI_BUILD=no OS_NAME=linux VSCODE_ARCH=x64 ./build.sh diff --git a/scripts/build_macos.sh b/build/build_macos.sh similarity index 96% rename from scripts/build_macos.sh rename to build/build_macos.sh index e06389d..f460524 100755 --- a/scripts/build_macos.sh +++ b/build/build_macos.sh @@ -5,4 +5,4 @@ rm -rf vscode . get_repo.sh -SHOULD_BUILD=yes CI_BUILD=no OS_NAME=osx VSCODE_ARCH=x64 . build.sh \ No newline at end of file +SHOULD_BUILD=yes CI_BUILD=no OS_NAME=osx VSCODE_ARCH=x64 . build.sh diff --git a/build/build_windows.ps1 b/build/build_windows.ps1 new file mode 100755 index 0000000..f051bf1 --- /dev/null +++ b/build/build_windows.ps1 @@ -0,0 +1,15 @@ +# powershell -ExecutionPolicy ByPass -File build_windows.ps1 + +$env:Path += ";C:\Program Files\Git\bin" + +Remove-Item -Recurse -Force VSCode* +Remove-Item -Recurse -Force vscode + +bash ./get_repo.sh + +$Env:SHOULD_BUILD = 'yes' +$Env:CI_BUILD = 'no' +$Env:OS_NAME = 'windows' +$Env:VSCODE_ARCH = 'x64' + +bash ./build.sh diff --git a/scripts/build_linux.sh b/scripts/build_linux.sh deleted file mode 100644 index 5bfeb67..0000000 --- a/scripts/build_linux.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -rm -rf VSCode* -rm -rf vscode - -. get_repo.sh - -SHOULD_BUILD=yes CI_BUILD=no OS_NAME=linux VSCODE_ARCH=x64 . build.sh \ No newline at end of file diff --git a/scripts/build_windows.sh b/scripts/build_windows.sh deleted file mode 100644 index 4cc2261..0000000 --- a/scripts/build_windows.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -rm -rf VSCode* -rm -rf vscode - -. get_repo.sh - -SHOULD_BUILD=yes CI_BUILD=no OS_NAME=windows VSCODE_ARCH=x64 . build.sh \ No newline at end of file