Skip to content

Commit d23ce88

Browse files
committed
Add yum repository registration
This is currently disabled until the repo is signed Part of microsoft#229
1 parent 5a6113b commit d23ce88

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

build/gulpfile.vscode.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,7 @@ function getRpmPackageArch(arch) {
338338

339339
function prepareRpmPackage(arch) {
340340
var binaryDir = '../VSCode-linux-' + arch;
341+
var rpmArch = getRpmPackageArch(arch);
341342
var destination = rpmBuildPath;
342343
var packageRevision = getEpochTime();
343344

@@ -359,8 +360,11 @@ function prepareRpmPackage(arch) {
359360

360361
var spec = gulp.src('resources/linux/rpm/code.spec.template', { base: '.' })
361362
.pipe(replace('@@NAME@@', product.applicationName))
363+
.pipe(replace('@@NAME_LONG@@', product.nameLong))
362364
.pipe(replace('@@VERSION@@', packageJson.version))
363365
.pipe(replace('@@RELEASE@@', packageRevision))
366+
.pipe(replace('@@QUALITY@@', product.quality || '@@QUALITY@@'))
367+
.pipe(replace('@@ARCHITECTURE@@', rpmArch))
364368
.pipe(rename('SPECS/' + product.applicationName + '.spec'));
365369

366370
var specIcon = gulp.src('resources/linux/rpm/code.xpm', { base: '.' })

resources/linux/rpm/code.spec.template

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,16 @@ if [ "@@NAME@@" = "code" ]; then
3030
rm -f /usr/local/bin/code
3131
fi
3232

33+
# Register yum repository
34+
# TODO: #229: Enable once the yum repository is signed
35+
#if [ "@@NAME@@" != "code-oss" ]; then
36+
# if [ -d "/etc/yum.repos.d" ]; then
37+
# REPO_FILE=/etc/yum.repos.d/@@NAME@@.repo
38+
# rm -f $REPO_FILE
39+
# echo -e "[@@NAME@@]\nname=@@NAME_LONG@@\nbaseurl=https://vscode-update.azurewebsites.net/api/rpm/@@QUALITY@@/@@ARCHITECTURE@@/rpm" > $REPO_FILE
40+
# fi
41+
#fi
42+
3343
%files
3444
%defattr(-,root,root)
3545

0 commit comments

Comments
 (0)