From a59b3510ff462759bdd49014ffaed5249bbf9a5d Mon Sep 17 00:00:00 2001 From: Shelikhoo Date: Mon, 15 Apr 2019 18:39:47 +0800 Subject: [PATCH] move primary dir --- azure-pipelines.yml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index f72c550ed..67f2eb940 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -50,16 +50,20 @@ jobs: pool: vmImage: 'Ubuntu 16.04' - + variables: - GOPATH: '$(system.defaultWorkingDirectory)' + GOPATH: '$(system.defaultWorkingDirectory)/gopath' BAZEL_VER: '0.23.0' steps: - - checkout: none + - checkout: self - task: GoTool@0 inputs: version: '1.12' + - script: | + mkdir gopath + displayName: Prepare Environment + workingDirectory: '$(system.defaultWorkingDirectory)' - script: | sudo apt-get -y update sudo apt-get -y install jq git file pkg-config zip g++ zlib1g-dev unzip python openssl @@ -67,26 +71,26 @@ jobs: - script: | go version go get -v -t -d v2ray.com/core/... - workingDirectory: '$(system.defaultWorkingDirectory)' + workingDirectory: '$(GOPATH)' displayName: 'Fetch sources' - script: | mkdir release cd src zip -9 -r ../release/src_all.zip * -x '*.git*' - workingDirectory: '$(system.defaultWorkingDirectory)' + workingDirectory: '$(GOPATH)' displayName: 'Dump sources' - script: | curl -L -o bazel-installer.sh https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VER}/bazel-${BAZEL_VER}-installer-linux-x86_64.sh chmod +x bazel-installer.sh ./bazel-installer.sh --user - workingDirectory: '$(system.defaultWorkingDirectory)' + workingDirectory: '$(GOPATH)' displayName: 'Install Bazel' - script: | cd ./src/v2ray.com/core $HOME/bin/bazel build --action_env=GOPATH=$GOPATH --action_env=PATH=$PATH --action_env=GPG_PASS=${SIGN_KEY_PASS} //release:all - workingDirectory: '$(system.defaultWorkingDirectory)' + workingDirectory: '$(GOPATH)' displayName: 'Build Binaries' - script: | cp ./src/v2ray.com/core/bazel-bin/release/*.zip ./release/ - workingDirectory: '$(system.defaultWorkingDirectory)' + workingDirectory: '$(GOPATH)' displayName: 'Dump Binaries'