Skip to content

Commit 08009c5

Browse files
committed
Pull linux package revision initialization to top
This prevents potentially different revisions for deb and rpm files built during same gulp task.
1 parent f3861c6 commit 08009c5

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

build/gulpfile.vscode.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ gulp.task('minify-vscode', ['clean-minified-vscode', 'optimize-vscode'], common.
9595
// Package
9696
var product = require('../product.json');
9797
var darwinCreditsTemplate = product.darwinCredits && _.template(fs.readFileSync(path.join(root, product.darwinCredits), 'utf8'));
98+
var linuxPackageRevision = getEpochTime();
9899

99100
var config = {
100101
version: packageJson.electronVersion,
@@ -265,7 +266,6 @@ function prepareDebPackage(arch) {
265266
var binaryDir = '../VSCode-linux-' + arch;
266267
var debArch = getDebPackageArch(arch);
267268
var destination = '.build/linux/deb/' + debArch + '/' + product.applicationName + '-' + debArch;
268-
var packageRevision = getEpochTime();
269269

270270
return function () {
271271
var desktop = gulp.src('resources/linux/code.desktop', { base: '.' })
@@ -287,7 +287,7 @@ function prepareDebPackage(arch) {
287287
var that = this;
288288
gulp.src('resources/linux/debian/control.template', { base: '.' })
289289
.pipe(replace('@@NAME@@', product.applicationName))
290-
.pipe(replace('@@VERSION@@', packageJson.version + '-' + packageRevision))
290+
.pipe(replace('@@VERSION@@', packageJson.version + '-' + linuxPackageRevision))
291291
.pipe(replace('@@ARCHITECTURE@@', debArch))
292292
.pipe(replace('@@INSTALLEDSIZE@@', Math.ceil(size / 1024)))
293293
.pipe(rename('DEBIAN/control'))
@@ -336,7 +336,6 @@ function getRpmPackageArch(arch) {
336336
function prepareRpmPackage(arch) {
337337
var binaryDir = '../VSCode-linux-' + arch;
338338
var rpmArch = getRpmPackageArch(arch);
339-
var packageRevision = getEpochTime();
340339

341340
return function () {
342341
var desktop = gulp.src('resources/linux/code.desktop', { base: '.' })
@@ -355,7 +354,7 @@ function prepareRpmPackage(arch) {
355354
.pipe(replace('@@NAME@@', product.applicationName))
356355
.pipe(replace('@@NAME_LONG@@', product.nameLong))
357356
.pipe(replace('@@VERSION@@', packageJson.version))
358-
.pipe(replace('@@RELEASE@@', packageRevision))
357+
.pipe(replace('@@RELEASE@@', linuxPackageRevision))
359358
.pipe(replace('@@ARCHITECTURE@@', rpmArch))
360359
.pipe(replace('@@QUALITY@@', product.quality || '@@QUALITY@@'))
361360
.pipe(replace('@@UPDATEURL@@', product.updateUrl || '@@UPDATEURL@@'))

0 commit comments

Comments
 (0)