소스 검색

move build scripts

Baptiste Augrain 4 년 전
부모
커밋
59ad206f9e

+ 2 - 0
.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

+ 2 - 0
.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

+ 2 - 0
.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

+ 1 - 1
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'));
+process.stdout.write(shasum.digest('hex'));

+ 8 - 0
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

+ 1 - 1
scripts/build_macos.sh → 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
+SHOULD_BUILD=yes CI_BUILD=no OS_NAME=osx VSCODE_ARCH=x64 . build.sh

+ 15 - 0
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

+ 0 - 8
scripts/build_linux.sh

@@ -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

+ 0 - 8
scripts/build_windows.sh

@@ -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