@@ -67,6 +67,31 @@ build_script:
6767 - mkdir src
6868 - update_depot_tools.bat
6969 - ps : Move-Item $env:APPVEYOR_BUILD_FOLDER -Destination src\electron
70+ - ps : >-
71+ if (Test-Path 'env:RAW_GOMA_AUTH') {
72+ $env:GOMA_OAUTH2_CONFIG_FILE = "$pwd\.goma_oauth2_config"
73+ $env:RAW_GOMA_AUTH | Set-Content $env:GOMA_OAUTH2_CONFIG_FILE
74+ }
75+ - git clone https://github.com/electron/build-tools.git
76+ - cd build-tools
77+ - npm install
78+ - mkdir third_party
79+ - ps : >-
80+ node -e "require('./src/utils/goma.js').downloadAndPrepare({ gomaOneForAll: true })"
81+ - ps : $env:GN_GOMA_FILE = node -e "console.log(require('./src/utils/goma.js').gnFilePath)"
82+ - ps : $env:LOCAL_GOMA_DIR = node -e "console.log(require('./src/utils/goma.js').dir)"
83+ - cd ..
84+ - ps : .\src\electron\script\start-goma.ps1 -gomaDir $env:LOCAL_GOMA_DIR
85+ - ps : >-
86+ if (Test-Path 'env:RAW_GOMA_AUTH') {
87+ $goma_login = python $env:LOCAL_GOMA_DIR\goma_auth.py info
88+ if ($goma_login -eq 'Login as Fermi Planck') {
89+ Write-warning "Goma authentication is correct";
90+ } else {
91+ Write-warning "WARNING!!!!!! Goma authentication is incorrect; please update Goma auth token.";
92+ $host.SetShouldExit(1)
93+ }
94+ }
7095 - ps : $env:CHROMIUM_BUILDTOOLS_PATH="$pwd\src\buildtools"
7196 - ps : >-
7297 if ($env:GN_CONFIG -ne 'release') {
@@ -130,21 +155,6 @@ build_script:
130155 Write-warning "Failed to add third_party\angle\.git; continuing anyway"
131156 }
132157 }
133- - ps : >-
134- if (Test-Path 'env:RAW_GOMA_AUTH') {
135- $env:GOMA_OAUTH2_CONFIG_FILE = "$pwd\.goma_oauth2_config"
136- $env:RAW_GOMA_AUTH | Set-Content $env:GOMA_OAUTH2_CONFIG_FILE
137- }
138- - git clone https://github.com/electron/build-tools.git
139- - cd build-tools
140- - npm install
141- - mkdir third_party
142- - ps : >-
143- node -e "require('./src/utils/goma.js').downloadAndPrepare({ gomaOneForAll: true })"
144- - ps : $env:GN_GOMA_FILE = node -e "console.log(require('./src/utils/goma.js').gnFilePath)"
145- - ps : $env:LOCAL_GOMA_DIR = node -e "console.log(require('./src/utils/goma.js').dir)"
146- - cd ..
147- - ps : .\src\electron\script\start-goma.ps1 -gomaDir $env:LOCAL_GOMA_DIR
148158 - cd src
149159 - set BUILD_CONFIG_PATH=//electron/build/args/%GN_CONFIG%.gn
150160 - gn gen out/Default "--args=import(\"%BUILD_CONFIG_PATH%\") import(\"%GN_GOMA_FILE%\") %GN_EXTRA_ARGS% "
0 commit comments