Skip to content

Commit 356874f

Browse files
committed
Merge branch 'joao/distro-fork'
2 parents d9e45c3 + 767606f commit 356874f

6 files changed

Lines changed: 52 additions & 36 deletions

File tree

build/azure-pipelines/darwin/product-build-darwin.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,20 @@ steps:
99

1010
- script: |
1111
set -e
12-
echo "machine monacotools.visualstudio.com password $(VSO_PAT)" > ~/.netrc
12+
13+
cat << EOF > ~/.netrc
14+
machine monacotools.visualstudio.com
15+
password $(VSO_PAT)
16+
machine github.com
17+
login vscode
18+
password $(VSCODE_MIXIN_PASSWORD)
19+
EOF
20+
1321
yarn
22+
VSCODE_MIXIN_PASSWORD="$(VSCODE_MIXIN_PASSWORD)" yarn gulp -- mixin
1423
yarn gulp -- hygiene
1524
yarn monaco-compile-check
1625
yarn strict-null-check
17-
VSCODE_MIXIN_PASSWORD="$(VSCODE_MIXIN_PASSWORD)" yarn gulp -- mixin
1826
node build/azure-pipelines/common/installDistro.js
1927
node build/lib/builtInExtensions.js
2028
displayName: Prepare build

build/azure-pipelines/linux/product-build-linux.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,19 @@ steps:
1414
export PKG_CONFIG_PATH="/usr/lib/i386-linux-gnu/pkgconfig"
1515
fi
1616
17-
echo "machine monacotools.visualstudio.com password $(VSO_PAT)" > ~/.netrc
17+
cat << EOF > ~/.netrc
18+
machine monacotools.visualstudio.com
19+
password $(VSO_PAT)
20+
machine github.com
21+
login vscode
22+
password $(VSCODE_MIXIN_PASSWORD)
23+
EOF
24+
1825
CHILD_CONCURRENCY=1 yarn
26+
VSCODE_MIXIN_PASSWORD="$(VSCODE_MIXIN_PASSWORD)" npm run gulp -- mixin
1927
npm run gulp -- hygiene
2028
npm run monaco-compile-check
2129
npm run strict-null-check
22-
VSCODE_MIXIN_PASSWORD="$(VSCODE_MIXIN_PASSWORD)" npm run gulp -- mixin
2330
node build/azure-pipelines/common/installDistro.js
2431
node build/lib/builtInExtensions.js
2532

build/azure-pipelines/win32/product-build-win32.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ steps:
1515
- powershell: |
1616
. build/azure-pipelines/win32/exec.ps1
1717
$ErrorActionPreference = "Stop"
18-
"machine monacotools.visualstudio.com password $(VSO_PAT)" | Out-File "$env:USERPROFILE\_netrc" -Encoding ASCII
18+
"machine monacotools.visualstudio.com`npassword $(VSO_PAT)`nmachine github.com`nlogin vscode`npassword $(VSCODE_MIXIN_PASSWORD)" | Out-File "$env:USERPROFILE\_netrc" -Encoding ASCII
1919
$env:npm_config_arch="$(VSCODE_ARCH)"
2020
$env:CHILD_CONCURRENCY="1"
2121
$env:VSCODE_MIXIN_PASSWORD="$(VSCODE_MIXIN_PASSWORD)"
2222
exec { yarn }
23+
exec { npm run gulp -- mixin }
2324
exec { npm run gulp -- hygiene }
2425
exec { npm run monaco-compile-check }
2526
exec { npm run strict-null-check }
26-
exec { npm run gulp -- mixin }
2727
exec { node build/azure-pipelines/common/installDistro.js }
2828
exec { node build/lib/builtInExtensions.js }
2929

build/gulpfile.hygiene.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ const indentationFilter = [
4242

4343
// except specific files
4444
'!ThirdPartyNotices.txt',
45-
'!LICENSE.txt',
45+
'!LICENSE.{txt,rtf}',
46+
'!LICENSES.chromium.html',
4647
'!**/LICENSE',
4748
'!src/vs/nls.js',
4849
'!src/vs/nls.build.js',

build/gulpfile.mixin.js

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ const json = require('gulp-json-editor');
1010
const buffer = require('gulp-buffer');
1111
const filter = require('gulp-filter');
1212
const es = require('event-stream');
13-
const util = require('./lib/util');
14-
const remote = require('gulp-remote-src');
15-
const zip = require('gulp-vinyl-zip');
16-
13+
const vfs = require('vinyl-fs');
1714
const pkg = require('../package.json');
15+
const cp = require('child_process');
16+
const fancyLog = require('fancy-log');
17+
const ansiColors = require('ansi-colors');
1818

1919
gulp.task('mixin', function () {
2020
const repo = process.env['VSCODE_MIXIN_REPO'];
@@ -31,38 +31,38 @@ gulp.task('mixin', function () {
3131
return;
3232
}
3333

34-
const url = `https://github.com/${repo}/archive/${pkg.distro}.zip`;
35-
const opts = { base: url };
36-
const username = process.env['VSCODE_MIXIN_USERNAME'];
37-
const password = process.env['VSCODE_MIXIN_PASSWORD'];
34+
const url = `https://github.com/${repo}.git`;
3835

39-
if (username || password) {
40-
opts.auth = { user: username || '', pass: password || '' };
41-
}
36+
cp.execSync(`git config user.email "vscode@microsoft.com"`);
37+
cp.execSync(`git config user.name "VSCode"`);
4238

43-
console.log('Mixing in sources from \'' + url + '\':');
39+
fancyLog(ansiColors.blue('[mixin]'), 'Add distro remote');
40+
cp.execSync(`git remote add distro ${url}`);
4441

45-
let all = remote('', opts)
46-
.pipe(zip.src())
47-
.pipe(filter(function (f) { return !f.isDirectory(); }))
48-
.pipe(util.rebase(1));
42+
fancyLog(ansiColors.blue('[mixin]'), 'Add fetch distro sources');
43+
cp.execSync(`git fetch distro`);
4944

50-
if (quality) {
51-
const productJsonFilter = filter('product.json', { restore: true });
52-
const mixin = all
53-
.pipe(filter(['quality/' + quality + '/**']))
54-
.pipe(util.rebase(2))
55-
.pipe(productJsonFilter)
56-
.pipe(buffer())
57-
.pipe(json(o => Object.assign({}, require('../product.json'), o)))
58-
.pipe(productJsonFilter.restore);
45+
fancyLog(ansiColors.blue('[mixin]'), `Merge ${pkg.distro} from distro`);
5946

60-
all = es.merge(mixin);
47+
try {
48+
cp.execSync(`git merge ${pkg.distro}`);
49+
} catch (err) {
50+
fancyLog(ansiColors.red('[mixin] ❌'), `Failed to merge ${pkg.distro} from distro. Please proceed with manual merge to fix the build.`);
51+
throw err;
6152
}
6253

63-
return all
54+
const productJsonFilter = filter('product.json', { restore: true });
55+
56+
fancyLog(ansiColors.blue('[mixin]'), `Mixing in sources:`);
57+
return vfs
58+
.src(`quality/${quality}/**`, { base: `quality/${quality}` })
59+
.pipe(filter(function (f) { return !f.isDirectory(); }))
60+
.pipe(productJsonFilter)
61+
.pipe(buffer())
62+
.pipe(json(o => Object.assign({}, require('../product.json'), o)))
63+
.pipe(productJsonFilter.restore)
6464
.pipe(es.mapSync(function (f) {
65-
console.log(f.relative);
65+
fancyLog(ansiColors.blue('[mixin]'), f.relative, ansiColors.green('✔︎'));
6666
return f;
6767
}))
6868
.pipe(gulp.dest('.'));

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "code-oss-dev",
33
"version": "1.33.0",
4-
"distro": "44b1ed5c65855e3a917543d93f5916a822882a2a",
4+
"distro": "ef073d0669d00835b9ad8399061b606646f7cc95",
55
"author": {
66
"name": "Microsoft Corporation"
77
},

0 commit comments

Comments
 (0)