From 182726178f562f214ddc1aa99b21ff49640be7d7 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Wed, 6 Jun 2018 15:56:26 +0200 Subject: [PATCH] cleanup build/tfs folder fixes #45746 --- build/tfs/common/common.sh | 43 ----- build/tfs/common/node.sh | 18 -- build/tfs/darwin/build.sh | 58 ------- build/tfs/darwin/build.yml | 51 ------ build/tfs/darwin/enqueue.js | 106 ++++++++++++ build/tfs/{common => darwin}/enqueue.ts | 0 build/tfs/darwin/release.sh | 22 --- build/tfs/linux/build-ia32.sh | 3 - build/tfs/linux/build-x64.sh | 3 - build/tfs/linux/build.sh | 64 ------- build/tfs/linux/build.yml | 103 ------------ build/tfs/linux/release.sh | 38 ++--- build/tfs/linux/release2.sh | 67 -------- build/tfs/product-build.yml | 4 +- build/tfs/win32/1_build.ps1 | 71 -------- build/tfs/win32/2_package.ps1 | 12 -- build/tfs/win32/3_upload.ps1 | 35 ---- build/tfs/win32/build.yml | 212 ------------------------ build/tfs/win32/build_unsigned.ps1 | 86 ---------- build/tfs/win32/lib.ps1 | 48 ------ build/tfs/win32/node.ps1 | 7 - 21 files changed, 120 insertions(+), 931 deletions(-) delete mode 100755 build/tfs/common/common.sh delete mode 100755 build/tfs/common/node.sh delete mode 100755 build/tfs/darwin/build.sh delete mode 100644 build/tfs/darwin/build.yml create mode 100644 build/tfs/darwin/enqueue.js rename build/tfs/{common => darwin}/enqueue.ts (100%) delete mode 100755 build/tfs/darwin/release.sh delete mode 100755 build/tfs/linux/build-ia32.sh delete mode 100755 build/tfs/linux/build-x64.sh delete mode 100755 build/tfs/linux/build.sh delete mode 100644 build/tfs/linux/build.yml delete mode 100755 build/tfs/linux/release2.sh delete mode 100644 build/tfs/win32/1_build.ps1 delete mode 100644 build/tfs/win32/2_package.ps1 delete mode 100644 build/tfs/win32/3_upload.ps1 delete mode 100644 build/tfs/win32/build.yml delete mode 100644 build/tfs/win32/build_unsigned.ps1 delete mode 100644 build/tfs/win32/lib.ps1 delete mode 100644 build/tfs/win32/node.ps1 diff --git a/build/tfs/common/common.sh b/build/tfs/common/common.sh deleted file mode 100755 index c64e3c881f9..00000000000 --- a/build/tfs/common/common.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/bash -set -e - -# set agent specific npm cache -if [ -n "$AGENT_WORKFOLDER" ] -then - export npm_config_cache="$AGENT_WORKFOLDER/npm-cache" - echo "Using npm cache: $npm_config_cache" - - export YARN_CACHE_FOLDER="$AGENT_WORKFOLDER/yarn-cache" - echo "Using yarn cache: $YARN_CACHE_FOLDER" -fi - -SUMMARY="Task;Duration"$'\n' -step() { - START=$SECONDS - TASK=$1; shift - echo "" - echo "*****************************************************************************" - echo "Start: $TASK" - echo "*****************************************************************************" - "$@" - - # Calculate total duration - TOTAL=$(echo "$SECONDS - $START" | bc) - M=$(echo "$TOTAL / 60" | bc) - S=$(echo "$TOTAL % 60" | bc) - DURATION="$(printf "%02d" $M):$(printf "%02d" $S)" - - echo "*****************************************************************************" - echo "End: $TASK, Total: $DURATION" - echo "*****************************************************************************" - SUMMARY="$SUMMARY$TASK;$DURATION"$'\n' -} - -done_steps() { - echo "" - echo "Build Summary" - echo "=============" - echo "${SUMMARY}" | column -t -s';' -} - -trap done_steps EXIT \ No newline at end of file diff --git a/build/tfs/common/node.sh b/build/tfs/common/node.sh deleted file mode 100755 index cc1bb74d01f..00000000000 --- a/build/tfs/common/node.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash -set -e - -# setup nvm -if [[ "$OSTYPE" == "darwin"* ]]; then - export NVM_DIR=~/.nvm - source $(brew --prefix nvm)/nvm.sh --no-use -else - source $NVM_DIR/nvm.sh --no-use -fi - -# install node -NODE_VERSION=8.9.1 -nvm install $NODE_VERSION -nvm use $NODE_VERSION - -# install yarn -npm i -g yarn \ No newline at end of file diff --git a/build/tfs/darwin/build.sh b/build/tfs/darwin/build.sh deleted file mode 100755 index 9c0b7a6f52a..00000000000 --- a/build/tfs/darwin/build.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/sh - -. ./build/tfs/common/node.sh -. ./scripts/env.sh -. ./build/tfs/common/common.sh - -export VSCODE_MIXIN_PASSWORD="$1" -export AZURE_STORAGE_ACCESS_KEY="$2" -export AZURE_STORAGE_ACCESS_KEY_2="$3" -export MOONCAKE_STORAGE_ACCESS_KEY="$4" -export AZURE_DOCUMENTDB_MASTERKEY="$5" -VSO_PAT="$6" - -echo "machine monacotools.visualstudio.com password $VSO_PAT" > ~/.netrc - -step "Install dependencies" \ - yarn - -step "Hygiene" \ - npm run gulp -- hygiene - -step "Monaco Editor Check" \ - ./node_modules/.bin/tsc -p ./src/tsconfig.monaco.json --noEmit - -step "Mix in repository from vscode-distro" \ - npm run gulp -- mixin - -step "Install distro dependencies" \ - node build/tfs/common/installDistro.js - -step "Build minified & upload source maps" \ - npm run gulp -- vscode-darwin-min upload-vscode-sourcemaps - -# step "Create loader snapshot" -# node build/lib/snapshotLoader.js - -step "Run unit tests" \ - ./scripts/test.sh --build --reporter dot - -step "Run integration tests" \ - ./scripts/test-integration.sh - -# function smoketest { -# ARTIFACTS="$AGENT_BUILDDIRECTORY/smoketest-artifacts" -# rm -rf $ARTIFACTS - -# [[ "$VSCODE_QUALITY" == "insider" ]] && VSCODE_APPNAME="Visual Studio Code - Insiders" || VSCODE_APPNAME="Visual Studio Code" -# npm run smoketest -- --build "$AGENT_BUILDDIRECTORY/VSCode-darwin/$VSCODE_APPNAME.app" --log $ARTIFACTS -# } - -# step "Run smoke test" \ -# smoketest - -step "Publish release" \ - ./build/tfs/darwin/release.sh - -step "Generate and upload configuration.json" \ - npm run gulp -- upload-vscode-configuration diff --git a/build/tfs/darwin/build.yml b/build/tfs/darwin/build.yml deleted file mode 100644 index 008314830a2..00000000000 --- a/build/tfs/darwin/build.yml +++ /dev/null @@ -1,51 +0,0 @@ -steps: - -- task: NodeTool@0 - inputs: - versionSpec: "8.9.1" - -- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2 - inputs: - versionSpec: "1.3.2" - -- script: | - echo "machine monacotools.visualstudio.com password $(VSO_PAT)" > ~/.netrc - yarn - npm run gulp -- hygiene - npm run monaco-compile-check - VSCODE_MIXIN_PASSWORD="$(VSCODE_MIXIN_PASSWORD)" npm run gulp -- mixin electron - node build/tfs/common/installDistro.js - -- script: | - VSCODE_MIXIN_PASSWORD="$(VSCODE_MIXIN_PASSWORD)" npm run gulp -- vscode-darwin-min - name: build - -- script: | - ./scripts/test.sh --build --tfs - name: test - -- script: | - # archive the unsigned build - pushd ../VSCode-darwin && zip -r -X -y ../VSCode-darwin-unsigned.zip * && popd - - # publish the unsigned build - PACKAGEJSON=`ls ../VSCode-darwin/*.app/Contents/Resources/app/package.json` - VERSION=`node -p "require(\"$PACKAGEJSON\").version"` - AZURE_DOCUMENTDB_MASTERKEY="$(AZURE_DOCUMENTDB_MASTERKEY)" \ - AZURE_STORAGE_ACCESS_KEY_2="$(AZURE_STORAGE_ACCESS_KEY_2)" \ - MOONCAKE_STORAGE_ACCESS_KEY="$(MOONCAKE_STORAGE_ACCESS_KEY)" \ - node build/tfs/common/publish.js \ - "$(VSCODE_QUALITY)" \ - darwin \ - archive-unsigned \ - "VSCode-darwin-$(VSCODE_QUALITY)-unsigned.zip" \ - $VERSION \ - false \ - ../VSCode-darwin-unsigned.zip - - # enqueue the unsigned build - AZURE_DOCUMENTDB_MASTERKEY="$(AZURE_DOCUMENTDB_MASTERKEY)" \ - AZURE_STORAGE_ACCESS_KEY_2="$(AZURE_STORAGE_ACCESS_KEY_2)" \ - node build/tfs/common/enqueue.js "$(VSCODE_QUALITY)" - - npm run gulp -- upload-vscode-configuration \ No newline at end of file diff --git a/build/tfs/darwin/enqueue.js b/build/tfs/darwin/enqueue.js new file mode 100644 index 00000000000..3b870657134 --- /dev/null +++ b/build/tfs/darwin/enqueue.js @@ -0,0 +1,106 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [0, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var child_process_1 = require("child_process"); +var documentdb_1 = require("documentdb"); +var azure = require("azure-storage"); +function queueSigningRequest(quality, commit) { + var retryOperations = new azure.ExponentialRetryPolicyFilter(); + var queueSvc = azure + .createQueueService(process.env['AZURE_STORAGE_ACCOUNT_2'], process.env['AZURE_STORAGE_ACCESS_KEY_2']) + .withFilter(retryOperations); + queueSvc.messageEncoder = new azure.QueueMessageEncoder.TextBase64QueueMessageEncoder(); + var message = quality + "/" + commit; + return new Promise(function (c, e) { return queueSvc.createMessage('sign-darwin', message, function (err) { return err ? e(err) : c(); }); }); +} +function isBuildSigned(quality, commit) { + var client = new documentdb_1.DocumentClient(process.env['AZURE_DOCUMENTDB_ENDPOINT'], { masterKey: process.env['AZURE_DOCUMENTDB_MASTERKEY'] }); + var collection = 'dbs/builds/colls/' + quality; + var updateQuery = { + query: 'SELECT TOP 1 * FROM c WHERE c.id = @id', + parameters: [{ name: '@id', value: commit }] + }; + return new Promise(function (c, e) { + client.queryDocuments(collection, updateQuery).toArray(function (err, results) { + if (err) { + return e(err); + } + if (results.length !== 1) { + return c(false); + } + var release = results[0]; + var assets = release.assets; + var isSigned = assets.some(function (a) { return a.platform === 'darwin' && a.type === 'archive'; }); + c(isSigned); + }); + }); +} +// async function waitForSignedBuild(quality: string, commit: string): Promise { +// let retries = 0; +// while (retries < 180) { +// if (await isBuildSigned(quality, commit)) { +// return; +// } +// await new Promise(c => setTimeout(c, 10000)); +// retries++; +// } +// throw new Error('Timed out waiting for signed build'); +// } +function main(quality) { + return __awaiter(this, void 0, void 0, function () { + var commit; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + commit = child_process_1.execSync('git rev-parse HEAD', { encoding: 'utf8' }).trim(); + console.log("Queueing signing request for '" + quality + "/" + commit + "'..."); + return [4 /*yield*/, queueSigningRequest(quality, commit)]; + case 1: + _a.sent(); + return [2 /*return*/]; + } + }); + }); +} +main(process.argv[2]).catch(function (err) { + console.error(err); + process.exit(1); +}); diff --git a/build/tfs/common/enqueue.ts b/build/tfs/darwin/enqueue.ts similarity index 100% rename from build/tfs/common/enqueue.ts rename to build/tfs/darwin/enqueue.ts diff --git a/build/tfs/darwin/release.sh b/build/tfs/darwin/release.sh deleted file mode 100755 index 857b6f38513..00000000000 --- a/build/tfs/darwin/release.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh - -. ./scripts/env.sh -. ./build/tfs/common/common.sh - -REPO=`pwd` -ZIP=$REPO/../VSCode-darwin-selfsigned.zip -UNSIGNEDZIP=$REPO/../VSCode-darwin-unsigned.zip -BUILD=$REPO/../VSCode-darwin -PACKAGEJSON=`ls $BUILD/*.app/Contents/Resources/app/package.json` -VERSION=`node -p "require(\"$PACKAGEJSON\").version"` - -rm -rf $UNSIGNEDZIP -(cd $BUILD && \ - step "Create unsigned archive" \ - zip -r -X -y $UNSIGNEDZIP *) - -step "Upload unsigned archive" \ - node build/tfs/common/publish.js $VSCODE_QUALITY darwin archive-unsigned VSCode-darwin-$VSCODE_QUALITY-unsigned.zip $VERSION false $UNSIGNEDZIP - -step "Sign build" \ - node build/tfs/common/enqueue.js $VSCODE_QUALITY \ No newline at end of file diff --git a/build/tfs/linux/build-ia32.sh b/build/tfs/linux/build-ia32.sh deleted file mode 100755 index 0b0f1c2a458..00000000000 --- a/build/tfs/linux/build-ia32.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -set -e -./build/tfs/linux/build.sh ia32 "$@" \ No newline at end of file diff --git a/build/tfs/linux/build-x64.sh b/build/tfs/linux/build-x64.sh deleted file mode 100755 index fb5b38e02b3..00000000000 --- a/build/tfs/linux/build-x64.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -set -e -./build/tfs/linux/build.sh x64 "$@" \ No newline at end of file diff --git a/build/tfs/linux/build.sh b/build/tfs/linux/build.sh deleted file mode 100755 index e23049b5cf4..00000000000 --- a/build/tfs/linux/build.sh +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/bash - -. ./build/tfs/common/node.sh -. ./scripts/env.sh -. ./build/tfs/common/common.sh - -export ARCH="$1" -export npm_config_arch="$ARCH" -export VSCODE_MIXIN_PASSWORD="$2" -export AZURE_STORAGE_ACCESS_KEY="$3" -export AZURE_STORAGE_ACCESS_KEY_2="$4" -export MOONCAKE_STORAGE_ACCESS_KEY="$5" -export AZURE_DOCUMENTDB_MASTERKEY="$6" -export LINUX_REPO_PASSWORD="$7" -VSO_PAT="$8" - -echo "machine monacotools.visualstudio.com password $VSO_PAT" > ~/.netrc - -step "Install dependencies" \ - yarn - -step "Hygiene" \ - npm run gulp -- hygiene - -step "Monaco Editor Check" \ - ./node_modules/.bin/tsc -p ./src/tsconfig.monaco.json --noEmit - -step "Mix in repository from vscode-distro" \ - npm run gulp -- mixin - -step "Get Electron" \ - npm run gulp -- "electron-$ARCH" - -step "Install distro dependencies" \ - node build/tfs/common/installDistro.js - -step "Build minified" \ - npm run gulp -- "vscode-linux-$ARCH-min" - -# step "Create loader snapshot" -# node build/lib/snapshotLoader.js --arch=$ARCH - -step "Run unit tests" \ - ./scripts/test.sh --build --reporter dot - -# function smoketest { -# id -u testuser &>/dev/null || (useradd -m testuser; chpasswd <<< testuser:testpassword) -# sudo -i -u testuser -- sh -c 'git config --global user.name "VS Code Agent" && git config --global user.email "monacotools@microsoft.com"' - -# ARTIFACTS="$AGENT_BUILDDIRECTORY/smoketest-artifacts" -# rm -rf $ARTIFACTS -# mkdir -p $ARTIFACTS -# chown -R testuser $ARTIFACTS - -# ps -o pid= -u testuser | xargs sudo kill -9 -# DISPLAY=:10 sudo -i -u testuser -- sh -c "cd $BUILD_SOURCESDIRECTORY/test/smoke && ./node_modules/.bin/mocha --build $AGENT_BUILDDIRECTORY/VSCode-linux-$ARCH --log $ARTIFACTS" -# # DISPLAY=:10 sudo -i -u testuser -- sh -c "cd /vso/work/1/s/test/smoke && ./node_modules/.bin/mocha --build /vso/work/1/VSCode-linux-ia32" -# } - -# step "Run smoke test" \ -# smoketest - -step "Publish release" \ - ./build/tfs/linux/release.sh diff --git a/build/tfs/linux/build.yml b/build/tfs/linux/build.yml deleted file mode 100644 index 1234e2d411b..00000000000 --- a/build/tfs/linux/build.yml +++ /dev/null @@ -1,103 +0,0 @@ -steps: - -- script: | - # dependencies - dpkg --add-architecture i386 - apt-get update - - DEPS=" \ - gcc-multilib g++-multilib \ - pkg-config \ - dbus \ - xvfb \ - fakeroot \ - bc \ - bsdmainutils \ - rpm \ - " - - if [[ "$(VSCODE_ARCH)" == "x64" ]]; then - DEPS="$DEPS \ - dpkg-dev \ - libgconf-2-4 \ - libnss3 \ - libasound2 \ - libxtst6 \ - libx11-dev \ - libxkbfile-dev \ - libxss1 \ - libx11-xcb-dev \ - libsecret-1-dev \ - " - else - DEPS="$DEPS \ - dpkg-dev:i386 \ - libgconf-2-4:i386 \ - libnss3:i386 \ - libasound2:i386 \ - libxtst6:i386 \ - libnotify4:i386 \ - libx11-dev:i386 \ - libxkbfile-dev:i386 \ - libxss1:i386 \ - libx11-xcb-dev:i386 \ - libgl1-mesa-glx:i386 libgl1-mesa-dri:i386 \ - libgirepository-1.0-1:i386 \ - gir1.2-glib-2.0:i386 \ - gir1.2-secret-1:i386 \ - libsecret-1-dev:i386 \ - libgtk2.0-0:i386 \ - " - fi - - apt-get install -y $DEPS - - # setup xvfb - cp build/tfs/linux/$(VSCODE_ARCH)/xvfb.init /etc/init.d/xvfb - chmod +x /etc/init.d/xvfb - update-rc.d xvfb defaults - service xvfb start - - # setup dbus - ln -sf /bin/dbus-daemon /usr/bin/dbus-daemon - service dbus start - -- task: NodeTool@0 - inputs: - versionSpec: "8.9.1" - -- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2 - inputs: - versionSpec: "1.3.2" - -- script: | - export npm_config_arch="$(VSCODE_ARCH)" - if [[ "$(VSCODE_ARCH)" == "ia32" ]]; then - export PKG_CONFIG_PATH="/usr/lib/i386-linux-gnu/pkgconfig" - fi - - echo "machine monacotools.visualstudio.com password $(VSO_PAT)" > ~/.netrc - yarn - npm run gulp -- hygiene - npm run monaco-compile-check - VSCODE_MIXIN_PASSWORD="$(VSCODE_MIXIN_PASSWORD)" npm run gulp -- mixin - node build/tfs/common/installDistro.js - -- script: | - VSCODE_MIXIN_PASSWORD="$(VSCODE_MIXIN_PASSWORD)" npm run gulp -- vscode-linux-$(VSCODE_ARCH)-min - name: build - -- script: | - npm run gulp -- "electron-$(VSCODE_ARCH)" - DISPLAY=:10 ./scripts/test.sh --build --tfs - name: test - -- script: | - npm run gulp -- "vscode-linux-$(VSCODE_ARCH)-build-deb" - npm run gulp -- "vscode-linux-$(VSCODE_ARCH)-build-rpm" - #npm run gulp -- "vscode-linux-$(VSCODE_ARCH)-build-snap" - - AZURE_DOCUMENTDB_MASTERKEY="$(AZURE_DOCUMENTDB_MASTERKEY)" \ - AZURE_STORAGE_ACCESS_KEY_2="$(AZURE_STORAGE_ACCESS_KEY_2)" \ - MOONCAKE_STORAGE_ACCESS_KEY="$(MOONCAKE_STORAGE_ACCESS_KEY)" \ - ./build/tfs/linux/release2.sh "$(VSCODE_ARCH)" "$(LINUX_REPO_PASSWORD)" \ No newline at end of file diff --git a/build/tfs/linux/release.sh b/build/tfs/linux/release.sh index 1025ac9df48..ad74ce0a385 100755 --- a/build/tfs/linux/release.sh +++ b/build/tfs/linux/release.sh @@ -1,16 +1,9 @@ #!/bin/bash +set -e -. ./scripts/env.sh -. ./build/tfs/common/common.sh - -step "Build Debian package" \ - npm run gulp -- "vscode-linux-$ARCH-build-deb" - -step "Build RPM package" \ - npm run gulp -- "vscode-linux-$ARCH-build-rpm" - -# step "Build snap package" \ -# npm run gulp -- "vscode-linux-$ARCH-build-snap" +# Arguments +ARCH="$1" +LINUX_REPO_PASSWORD="$2" # Variables PLATFORM_LINUX="linux-$ARCH" @@ -29,24 +22,19 @@ PACKAGEJSON="$BUILD/resources/app/package.json" VERSION=$(node -p "require(\"$PACKAGEJSON\").version") rm -rf $ROOT/code-*.tar.* -(cd $ROOT && \ - step "Create tar.gz archive" \ - tar -czf $TARBALL_PATH $BUILDNAME) +(cd $ROOT && tar -czf $TARBALL_PATH $BUILDNAME) -step "Publish tar.gz archive" \ - node build/tfs/common/publish.js $VSCODE_QUALITY $PLATFORM_LINUX archive-unsigned $TARBALL_FILENAME $VERSION true $TARBALL_PATH +node build/tfs/common/publish.js $VSCODE_QUALITY $PLATFORM_LINUX archive-unsigned $TARBALL_FILENAME $VERSION true $TARBALL_PATH DEB_FILENAME="$(ls $REPO/.build/linux/deb/$DEB_ARCH/deb/)" DEB_PATH="$REPO/.build/linux/deb/$DEB_ARCH/deb/$DEB_FILENAME" -step "Publish Debian package" \ - node build/tfs/common/publish.js $VSCODE_QUALITY $PLATFORM_DEB package $DEB_FILENAME $VERSION true $DEB_PATH +node build/tfs/common/publish.js $VSCODE_QUALITY $PLATFORM_DEB package $DEB_FILENAME $VERSION true $DEB_PATH RPM_FILENAME="$(ls $REPO/.build/linux/rpm/$RPM_ARCH/ | grep .rpm)" RPM_PATH="$REPO/.build/linux/rpm/$RPM_ARCH/$RPM_FILENAME" -step "Publish RPM package" \ - node build/tfs/common/publish.js $VSCODE_QUALITY $PLATFORM_RPM package $RPM_FILENAME $VERSION true $RPM_PATH +node build/tfs/common/publish.js $VSCODE_QUALITY $PLATFORM_RPM package $RPM_FILENAME $VERSION true $RPM_PATH # SNAP_FILENAME="$(ls $REPO/.build/linux/snap/$ARCH/ | grep .snap)" # SNAP_PATH="$REPO/.build/linux/snap/$ARCH/$SNAP_FILENAME" @@ -61,17 +49,15 @@ else if [ "$BUILD_SOURCEBRANCH" = "master" ] || [ "$BUILD_SOURCEBRANCH" = "refs/heads/master" ]; then if [[ $BUILD_QUEUEDBY = *"Project Collection Service Accounts"* || $BUILD_QUEUEDBY = *"Microsoft.VisualStudio.Services.TFS"* ]]; then # Write config files needed by API, use eval to force environment variable expansion - DIRNAME=$(dirname $(readlink -f $0)) - pushd $DIRNAME + pushd build/tfs/linux # Submit to apt repo if [ "$DEB_ARCH" = "amd64" ]; then - eval echo '{ \"server\": \"azure-apt-cat.cloudapp.net\", \"protocol\": \"https\", \"port\": \"443\", \"repositoryId\": \"58a4adf642421134a1a48d1a\", \"username\": \"$LINUX_REPO_USERNAME\", \"password\": \"$LINUX_REPO_PASSWORD\" }' > apt-config.json + eval echo '{ \"server\": \"azure-apt-cat.cloudapp.net\", \"protocol\": \"https\", \"port\": \"443\", \"repositoryId\": \"58a4adf642421134a1a48d1a\", \"username\": \"vscode\", \"password\": \"$LINUX_REPO_PASSWORD\" }' > apt-config.json - step "Publish to repositories" \ - ./repoapi_client.sh -config apt-config.json -addfile $DEB_PATH + ./repoapi_client.sh -config apt-config.json -addfile $DEB_PATH fi # Submit to yum repo (disabled as it's manual until signing is automated) - # eval echo '{ \"server\": \"azure-apt-cat.cloudapp.net\", \"protocol\": \"https\", \"port\": \"443\", \"repositoryId\": \"58a4ae3542421134a1a48d1b\", \"username\": \"$LINUX_REPO_USERNAME\", \"password\": \"$LINUX_REPO_PASSWORD\" }' > yum-config.json + # eval echo '{ \"server\": \"azure-apt-cat.cloudapp.net\", \"protocol\": \"https\", \"port\": \"443\", \"repositoryId\": \"58a4ae3542421134a1a48d1b\", \"username\": \"vscode\", \"password\": \"$LINUX_REPO_PASSWORD\" }' > yum-config.json # ./repoapi_client.sh -config yum-config.json -addfile $RPM_PATH popd diff --git a/build/tfs/linux/release2.sh b/build/tfs/linux/release2.sh deleted file mode 100755 index ad74ce0a385..00000000000 --- a/build/tfs/linux/release2.sh +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/bash -set -e - -# Arguments -ARCH="$1" -LINUX_REPO_PASSWORD="$2" - -# Variables -PLATFORM_LINUX="linux-$ARCH" -PLATFORM_DEB="linux-deb-$ARCH" -PLATFORM_RPM="linux-rpm-$ARCH" -[[ "$ARCH" == "ia32" ]] && DEB_ARCH="i386" || DEB_ARCH="amd64" -[[ "$ARCH" == "ia32" ]] && RPM_ARCH="i386" || RPM_ARCH="x86_64" -REPO="`pwd`" -ROOT="$REPO/.." -BUILDNAME="VSCode-$PLATFORM_LINUX" -BUILD="$ROOT/$BUILDNAME" -BUILD_VERSION="$(ls $REPO/.build/linux/deb/$DEB_ARCH/deb/ | sed -e 's/code-[a-z]*_//g' -e 's/\.deb$//g')" -[ -z "$VSCODE_QUALITY" ] && TARBALL_FILENAME="code-$BUILD_VERSION.tar.gz" || TARBALL_FILENAME="code-$VSCODE_QUALITY-$BUILD_VERSION.tar.gz" -TARBALL_PATH="$ROOT/$TARBALL_FILENAME" -PACKAGEJSON="$BUILD/resources/app/package.json" -VERSION=$(node -p "require(\"$PACKAGEJSON\").version") - -rm -rf $ROOT/code-*.tar.* -(cd $ROOT && tar -czf $TARBALL_PATH $BUILDNAME) - -node build/tfs/common/publish.js $VSCODE_QUALITY $PLATFORM_LINUX archive-unsigned $TARBALL_FILENAME $VERSION true $TARBALL_PATH - -DEB_FILENAME="$(ls $REPO/.build/linux/deb/$DEB_ARCH/deb/)" -DEB_PATH="$REPO/.build/linux/deb/$DEB_ARCH/deb/$DEB_FILENAME" - -node build/tfs/common/publish.js $VSCODE_QUALITY $PLATFORM_DEB package $DEB_FILENAME $VERSION true $DEB_PATH - -RPM_FILENAME="$(ls $REPO/.build/linux/rpm/$RPM_ARCH/ | grep .rpm)" -RPM_PATH="$REPO/.build/linux/rpm/$RPM_ARCH/$RPM_FILENAME" - -node build/tfs/common/publish.js $VSCODE_QUALITY $PLATFORM_RPM package $RPM_FILENAME $VERSION true $RPM_PATH - -# SNAP_FILENAME="$(ls $REPO/.build/linux/snap/$ARCH/ | grep .snap)" -# SNAP_PATH="$REPO/.build/linux/snap/$ARCH/$SNAP_FILENAME" - -IS_FROZEN="$(node build/tfs/linux/frozen-check.js $VSCODE_QUALITY)" - -if [ -z "$VSCODE_QUALITY" ]; then - echo "VSCODE_QUALITY is not set, skipping repo package publish" -elif [ "$IS_FROZEN" = "true" ]; then - echo "$VSCODE_QUALITY is frozen, skipping repo package publish" -else - if [ "$BUILD_SOURCEBRANCH" = "master" ] || [ "$BUILD_SOURCEBRANCH" = "refs/heads/master" ]; then - if [[ $BUILD_QUEUEDBY = *"Project Collection Service Accounts"* || $BUILD_QUEUEDBY = *"Microsoft.VisualStudio.Services.TFS"* ]]; then - # Write config files needed by API, use eval to force environment variable expansion - pushd build/tfs/linux - # Submit to apt repo - if [ "$DEB_ARCH" = "amd64" ]; then - eval echo '{ \"server\": \"azure-apt-cat.cloudapp.net\", \"protocol\": \"https\", \"port\": \"443\", \"repositoryId\": \"58a4adf642421134a1a48d1a\", \"username\": \"vscode\", \"password\": \"$LINUX_REPO_PASSWORD\" }' > apt-config.json - - ./repoapi_client.sh -config apt-config.json -addfile $DEB_PATH - fi - # Submit to yum repo (disabled as it's manual until signing is automated) - # eval echo '{ \"server\": \"azure-apt-cat.cloudapp.net\", \"protocol\": \"https\", \"port\": \"443\", \"repositoryId\": \"58a4ae3542421134a1a48d1b\", \"username\": \"vscode\", \"password\": \"$LINUX_REPO_PASSWORD\" }' > yum-config.json - - # ./repoapi_client.sh -config yum-config.json -addfile $RPM_PATH - popd - echo "To check repo publish status run ./repoapi_client.sh -config config.json -check " - fi - fi -fi diff --git a/build/tfs/product-build.yml b/build/tfs/product-build.yml index 29fc43598e3..35f64ea2dad 100644 --- a/build/tfs/product-build.yml +++ b/build/tfs/product-build.yml @@ -340,7 +340,7 @@ phases: AZURE_DOCUMENTDB_MASTERKEY="$(AZURE_DOCUMENTDB_MASTERKEY)" \ AZURE_STORAGE_ACCESS_KEY_2="$(AZURE_STORAGE_ACCESS_KEY_2)" \ MOONCAKE_STORAGE_ACCESS_KEY="$(MOONCAKE_STORAGE_ACCESS_KEY)" \ - ./build/tfs/linux/release2.sh "$(VSCODE_ARCH)" "$(LINUX_REPO_PASSWORD)" + ./build/tfs/linux/release.sh "$(VSCODE_ARCH)" "$(LINUX_REPO_PASSWORD)" # publish hockeyapp symbols node build/tfs/common/symbols.js "$(VSCODE_MIXIN_PASSWORD)" "$(VSCODE_HOCKEYAPP_TOKEN)" "$(VSCODE_ARCH)" "$(VSCODE_HOCKEYAPP_ID_LINUX32)" @@ -407,7 +407,7 @@ phases: # enqueue the unsigned build AZURE_DOCUMENTDB_MASTERKEY="$(AZURE_DOCUMENTDB_MASTERKEY)" \ AZURE_STORAGE_ACCESS_KEY_2="$(AZURE_STORAGE_ACCESS_KEY_2)" \ - node build/tfs/common/enqueue.js "$(VSCODE_QUALITY)" + node build/tfs/darwin/enqueue.js "$(VSCODE_QUALITY)" AZURE_STORAGE_ACCESS_KEY="$(AZURE_STORAGE_ACCESS_KEY)" \ npm run gulp -- upload-vscode-configuration \ No newline at end of file diff --git a/build/tfs/win32/1_build.ps1 b/build/tfs/win32/1_build.ps1 deleted file mode 100644 index 0fcb56c1b9e..00000000000 --- a/build/tfs/win32/1_build.ps1 +++ /dev/null @@ -1,71 +0,0 @@ -Param( - [string]$arch, - [string]$mixinPassword, - [string]$vsoPAT -) - -. .\build\tfs\win32\node.ps1 -. .\scripts\env.ps1 -. .\build\tfs\win32\lib.ps1 - -# Create a _netrc file to download distro dependencies -# In order to get _netrc to work, we need a HOME variable setup -"machine monacotools.visualstudio.com password ${vsoPAT}" | Out-File "$env:HOME\_netrc" -Encoding ASCII - -# Set the right architecture -$env:npm_config_arch="$arch" -$env:CHILD_CONCURRENCY="1" - -step "Install dependencies" { - exec { & yarn } -} - -step "Hygiene" { - exec { & npm run gulp -- hygiene } -} - -step "Monaco Editor Check" { - exec { & .\node_modules\.bin\tsc -p .\src\tsconfig.monaco.json --noEmit } -} - -$env:VSCODE_MIXIN_PASSWORD = $mixinPassword -step "Mix in repository from vscode-distro" { - exec { & npm run gulp -- mixin } -} - -step "Get Electron" { - exec { & npm run gulp -- "electron-$global:arch" } -} - -step "Install distro dependencies" { - exec { & node build\tfs\common\installDistro.js } -} - -step "Build minified" { - exec { & npm run gulp -- "vscode-win32-$global:arch-min" } -} - -step "Copy Inno updater" { - exec { & npm run gulp -- "vscode-win32-$global:arch-copy-inno-updater" } -} - -# step "Create loader snapshot" { -# exec { & node build\lib\snapshotLoader.js --arch=$global:arch } -# } - -step "Run unit tests" { - exec { & .\scripts\test.bat --build --reporter dot } -} - -# step "Run integration tests" { -# exec { & .\scripts\test-integration.bat } -# } - -# step "Run smoke test" { -# $Artifacts = "$env:AGENT_BUILDDIRECTORY\smoketest-artifacts" -# Remove-Item -Recurse -Force -ErrorAction Ignore $Artifacts - -# exec { & npm run smoketest -- --build "$env:AGENT_BUILDDIRECTORY\VSCode-win32-$global:arch" --log "$Artifacts" } -# } - -done diff --git a/build/tfs/win32/2_package.ps1 b/build/tfs/win32/2_package.ps1 deleted file mode 100644 index dcd90611374..00000000000 --- a/build/tfs/win32/2_package.ps1 +++ /dev/null @@ -1,12 +0,0 @@ -Param( - [string]$arch -) - -. .\build\tfs\win32\node.ps1 -. .\build\tfs\win32\lib.ps1 - -step "Create archive and setup package" { - exec { & npm run gulp -- "vscode-win32-$global:arch-archive" "vscode-win32-$global:arch-setup" } -} - -done \ No newline at end of file diff --git a/build/tfs/win32/3_upload.ps1 b/build/tfs/win32/3_upload.ps1 deleted file mode 100644 index 8d10c908261..00000000000 --- a/build/tfs/win32/3_upload.ps1 +++ /dev/null @@ -1,35 +0,0 @@ -Param( - [string]$arch, - [string]$storageKey, - [string]$mooncakeStorageKey, - [string]$documentDbKey -) - -. .\build\tfs\win32\node.ps1 -. .\build\tfs\win32\lib.ps1 - -$Repo = "$(pwd)" -$Root = "$Repo\.." -$Exe = "$Repo\.build\win32-$arch\setup\VSCodeSetup.exe" -$Zip = "$Repo\.build\win32-$arch\archive\VSCode-win32-$arch.zip" -$Build = "$Root\VSCode-win32-$arch" - -# get version -$PackageJson = Get-Content -Raw -Path "$Build\resources\app\package.json" | ConvertFrom-Json -$Version = $PackageJson.version -$Quality = "$env:VSCODE_QUALITY" -$env:AZURE_STORAGE_ACCESS_KEY_2 = $storageKey -$env:MOONCAKE_STORAGE_ACCESS_KEY = $mooncakeStorageKey -$env:AZURE_DOCUMENTDB_MASTERKEY = $documentDbKey - -$assetPlatform = if ($arch -eq "ia32") { "win32" } else { "win32-x64" } - -step "Publish archive" { - exec { & node build/tfs/common/publish.js $Quality "$global:assetPlatform-archive" archive "VSCode-win32-$global:arch-$Version.zip" $Version true $Zip } -} - -step "Publish setup package" { - exec { & node build/tfs/common/publish.js $Quality "$global:assetPlatform" setup "VSCodeSetup-$global:arch-$Version.exe" $Version true $Exe } -} - -done \ No newline at end of file diff --git a/build/tfs/win32/build.yml b/build/tfs/win32/build.yml deleted file mode 100644 index d55b6f1bdea..00000000000 --- a/build/tfs/win32/build.yml +++ /dev/null @@ -1,212 +0,0 @@ -steps: - -- task: NodeTool@0 - inputs: - versionSpec: "8.9.1" - -- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2 - inputs: - versionSpec: "1.3.2" - -- powershell: | - "machine monacotools.visualstudio.com password $(VSO_PAT)" | Out-File "$env:USERPROFILE\_netrc" -Encoding ASCII - $env:npm_config_arch="$(VSCODE_ARCH)" - $env:CHILD_CONCURRENCY="1" - yarn - npm run gulp -- hygiene - npm run monaco-compile-check - $env:VSCODE_MIXIN_PASSWORD="$(VSCODE_MIXIN_PASSWORD)" - npm run gulp -- mixin - node build/tfs/common/installDistro.js - -- powershell: | - $env:VSCODE_MIXIN_PASSWORD="$(VSCODE_MIXIN_PASSWORD)" - npm run gulp -- "vscode-win32-$(VSCODE_ARCH)-min" - npm run gulp -- "vscode-win32-$(VSCODE_ARCH)-copy-inno-updater" - name: build - -- powershell: | - npm run gulp -- "electron-$(VSCODE_ARCH)" - .\scripts\test.bat --build --tfs - name: test - -- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1 - inputs: - ConnectedServiceName: 'ESRP CodeSign' - FolderPath: '$(agent.builddirectory)/VSCode-win32-$(VSCODE_ARCH)' - Pattern: '*.dll,*.exe,*.node' - signConfigType: inlineSignParams - inlineOperation: | - [ - { - "keyCode": "CP-229803", - "operationSetCode": "SigntoolSign", - "parameters": [ - { - "parameterName": "OpusName", - "parameterValue": "Microsoft" - }, - { - "parameterName": "OpusInfo", - "parameterValue": "http://www.microsoft.com" - }, - { - "parameterName": "PageHash", - "parameterValue": "/NPH" - }, - { - "parameterName": "TimeStamp", - "parameterValue": "/t \"http://ts4096.gtm.microsoft.com/TSS/AuthenticodeTS\"" - } - ], - "toolName": "sign", - "toolVersion": "1.0" - }, - { - "keyCode": "CP-230012", - "operationSetCode": "SigntoolSign", - "parameters": [ - { - "parameterName": "OpusName", - "parameterValue": "Microsoft" - }, - { - "parameterName": "OpusInfo", - "parameterValue": "http://www.microsoft.com" - }, - { - "parameterName": "Append", - "parameterValue": "/as" - }, - { - "parameterName": "FileDigest", - "parameterValue": "/fd \"SHA256\"" - }, - { - "parameterName": "PageHash", - "parameterValue": "/NPH" - }, - { - "parameterName": "TimeStamp", - "parameterValue": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256" - } - ], - "toolName": "sign", - "toolVersion": "1.0" - }, - { - "keyCode": "CP-230012", - "operationSetCode": "SigntoolVerify", - "parameters": [ - { - "parameterName": "VerifyAll", - "parameterValue": "/all" - } - ], - "toolName": "sign", - "toolVersion": "1.0" - } - ] - SessionTimeout: 120 - -- powershell: | - npm run gulp -- "vscode-win32-$(VSCODE_ARCH)-archive" "vscode-win32-$(VSCODE_ARCH)-setup" - -- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1 - inputs: - ConnectedServiceName: 'ESRP CodeSign' - FolderPath: '$(agent.builddirectory)' - Pattern: VSCodeSetup.exe - signConfigType: inlineSignParams - inlineOperation: | - [ - { - "keyCode": "CP-229803", - "operationSetCode": "SigntoolSign", - "parameters": [ - { - "parameterName": "OpusName", - "parameterValue": "Microsoft" - }, - { - "parameterName": "OpusInfo", - "parameterValue": "http://www.microsoft.com" - }, - { - "parameterName": "PageHash", - "parameterValue": "/NPH" - }, - { - "parameterName": "TimeStamp", - "parameterValue": "/t \"http://ts4096.gtm.microsoft.com/TSS/AuthenticodeTS\"" - } - ], - "toolName": "sign", - "toolVersion": "1.0" - }, - { - "keyCode": "CP-230012", - "operationSetCode": "SigntoolSign", - "parameters": [ - { - "parameterName": "OpusName", - "parameterValue": "Microsoft" - }, - { - "parameterName": "OpusInfo", - "parameterValue": "http://www.microsoft.com" - }, - { - "parameterName": "Append", - "parameterValue": "/as" - }, - { - "parameterName": "FileDigest", - "parameterValue": "/fd \"SHA256\"" - }, - { - "parameterName": "PageHash", - "parameterValue": "/NPH" - }, - { - "parameterName": "TimeStamp", - "parameterValue": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256" - } - ], - "toolName": "sign", - "toolVersion": "1.0" - }, - { - "keyCode": "CP-230012", - "operationSetCode": "SigntoolVerify", - "parameters": [ - { - "parameterName": "VerifyAll", - "parameterValue": "/all" - } - ], - "toolName": "sign", - "toolVersion": "1.0" - } - ] - SessionTimeout: 120 - -- powershell: | - $Repo = "$(pwd)" - $Root = "$Repo\.." - $Exe = "$Repo\.build\win32-$(VSCODE_ARCH)\setup\VSCodeSetup.exe" - $Zip = "$Repo\.build\win32-$(VSCODE_ARCH)\archive\VSCode-win32-$(VSCODE_ARCH).zip" - $Build = "$Root\VSCode-win32-$(VSCODE_ARCH)" - - # get version - $PackageJson = Get-Content -Raw -Path "$Build\resources\app\package.json" | ConvertFrom-Json - $Version = $PackageJson.version - $Quality = "$env:VSCODE_QUALITY" - $env:AZURE_STORAGE_ACCESS_KEY_2 = "$(AZURE_STORAGE_ACCESS_KEY_2)" - $env:MOONCAKE_STORAGE_ACCESS_KEY = "$(MOONCAKE_STORAGE_ACCESS_KEY)" - $env:AZURE_DOCUMENTDB_MASTERKEY = "$(AZURE_DOCUMENTDB_MASTERKEY)" - - $assetPlatform = if ("$(VSCODE_ARCH)" -eq "ia32") { "win32" } else { "win32-x64" } - - node build/tfs/common/publish.js $Quality "$global:assetPlatform-archive" archive "VSCode-win32-$(VSCODE_ARCH)-$Version.zip" $Version true $Zip - node build/tfs/common/publish.js $Quality "$global:assetPlatform" setup "VSCodeSetup-$(VSCODE_ARCH)-$Version.exe" $Version true $Exe \ No newline at end of file diff --git a/build/tfs/win32/build_unsigned.ps1 b/build/tfs/win32/build_unsigned.ps1 deleted file mode 100644 index 74e8203184e..00000000000 --- a/build/tfs/win32/build_unsigned.ps1 +++ /dev/null @@ -1,86 +0,0 @@ -Param( - [string]$arch, - [string]$mixinPassword, - [string]$vsoPAT, - [string]$storageKey, - [string]$mooncakeStorageKey, - [string]$documentDbKey -) - -. .\build\tfs\win32\node.ps1 -. .\scripts\env.ps1 -. .\build\tfs\win32\lib.ps1 - -# Create a _netrc file to download distro dependencies -# In order to get _netrc to work, we need a HOME variable setup -"machine monacotools.visualstudio.com password ${vsoPAT}" | Out-File "$env:HOME\_netrc" -Encoding ASCII - -# Set the right architecture -$env:npm_config_arch="$arch" -$env:CHILD_CONCURRENCY="1" - -step "Install dependencies" { - exec { & yarn } -} - -step "Hygiene" { - exec { & npm run gulp -- hygiene } -} - -$env:VSCODE_MIXIN_PASSWORD = $mixinPassword -step "Mix in repository from vscode-distro" { - exec { & npm run gulp -- mixin } -} - -step "Get Electron" { - exec { & npm run gulp -- "electron-$global:arch" } -} - -step "Install distro dependencies" { - exec { & node build\tfs\common\installDistro.js } -} - -step "Build minified" { - exec { & npm run gulp -- "vscode-win32-$global:arch-min" } -} - -step "Run unit tests" { - exec { & .\scripts\test.bat --build --reporter dot } -} - -step "Run smoke test" { - $Artifacts = "$env:AGENT_BUILDDIRECTORY\smoketest-artifacts" - Remove-Item -Recurse -Force -ErrorAction Ignore $Artifacts - - exec { & npm run smoketest -- --build "$env:AGENT_BUILDDIRECTORY\VSCode-win32-$global:arch" --log "$Artifacts" } -} - -step "Create archive and setup package" { - exec { & npm run gulp -- "vscode-win32-$global:arch-archive" "vscode-win32-$global:arch-setup" } -} - -$Repo = "$(pwd)" -$Root = "$Repo\.." -$Exe = "$Repo\.build\win32-$arch\setup\VSCodeSetup.exe" -$Zip = "$Repo\.build\win32-$arch\archive\VSCode-win32-$arch.zip" -$Build = "$Root\VSCode-win32-$arch" - -# get version -$PackageJson = Get-Content -Raw -Path "$Build\resources\app\package.json" | ConvertFrom-Json -$Version = $PackageJson.version -$Quality = "$env:VSCODE_QUALITY" -$env:AZURE_STORAGE_ACCESS_KEY_2 = $storageKey -$env:MOONCAKE_STORAGE_ACCESS_KEY = $mooncakeStorageKey -$env:AZURE_DOCUMENTDB_MASTERKEY = $documentDbKey - -$assetPlatform = if ($arch -eq "ia32") { "win32" } else { "win32-x64" } - -step "Publish UNSIGNED archive" { - exec { & node build/tfs/common/publish.js $Quality "$global:assetPlatform-archive" archive-unsigned "VSCode-win32-$global:arch-$Version-unsigned.zip" $Version false $Zip } -} - -step "Publish UNSIGNED setup package" { - exec { & node build/tfs/common/publish.js $Quality "$global:assetPlatform" setup-unsigned "VSCodeSetup-$global:arch-$Version-unsigned.exe" $Version false $Exe } -} - -done diff --git a/build/tfs/win32/lib.ps1 b/build/tfs/win32/lib.ps1 deleted file mode 100644 index 9b28df620d3..00000000000 --- a/build/tfs/win32/lib.ps1 +++ /dev/null @@ -1,48 +0,0 @@ -# stop when there's an error -$ErrorActionPreference = 'Stop' - -$env:HOME=$env:USERPROFILE - -if (Test-Path env:AGENT_WORKFOLDER) { - $env:HOME="${env:AGENT_WORKFOLDER}\home" - $env:npm_config_cache="${env:HOME}\npm-cache" - $env:YARN_CACHE_FOLDER="${env:HOME}\yarn-cache" - $env:npm_config_devdir="${env:HOME}\npm-devdir" - New-Item -Path "$env:HOME" -Type directory -Force | out-null - New-Item -Path "$env:npm_config_cache" -Type directory -Force | out-null -} - -# throw when a process exits with something other than 0 -function exec([scriptblock]$cmd, [string]$errorMessage = "Error executing command: " + $cmd) { - & $cmd - if ($LastExitCode -ne 0) { - throw $errorMessage - } -} - -$Summary = @() -function step($Task, $Step) { - echo "" - echo "*****************************************************************************" - echo "Start: $Task" - echo "*****************************************************************************" - echo "" - - $Stopwatch = [Diagnostics.Stopwatch]::StartNew() - Invoke-Command $Step - $Stopwatch.Stop() - $Formatted = "{0:g}" -f $Stopwatch.Elapsed - - echo "*****************************************************************************" - echo "End: $Task, Total: $Formatted" - echo "*****************************************************************************" - - $global:Summary += @{ "$Task" = $Formatted } -} - -function done() { - echo "" - echo "Build Summary" - echo "=============" - $global:Summary | Format-Table @{L="Task";E={$_.Name}}, @{L="Duration";E={$_.Value}} -} \ No newline at end of file diff --git a/build/tfs/win32/node.ps1 b/build/tfs/win32/node.ps1 deleted file mode 100644 index 14ccd0008b2..00000000000 --- a/build/tfs/win32/node.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -# install node -$env:Path = $env:NVM_HOME + ";" + $env:NVM_SYMLINK + ";" + $env:Path -$NodeVersion = "8.9.1" -# nvm install $NodeVersion -# nvm use $NodeVersion -# npm install -g yarn -$env:Path = $env:NVM_HOME + "\v" + $NodeVersion + ";" + $env:Path \ No newline at end of file