diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js index 7efd8e24295..dc913f59980 100644 --- a/build/gulpfile.vscode.js +++ b/build/gulpfile.vscode.js @@ -338,6 +338,7 @@ function getRpmPackageArch(arch) { function prepareRpmPackage(arch) { var binaryDir = '../VSCode-linux-' + arch; + var rpmArch = getRpmPackageArch(arch); var destination = rpmBuildPath; var packageRevision = getEpochTime(); @@ -359,8 +360,11 @@ function prepareRpmPackage(arch) { var spec = gulp.src('resources/linux/rpm/code.spec.template', { base: '.' }) .pipe(replace('@@NAME@@', product.applicationName)) + .pipe(replace('@@NAME_LONG@@', product.nameLong)) .pipe(replace('@@VERSION@@', packageJson.version)) .pipe(replace('@@RELEASE@@', packageRevision)) + .pipe(replace('@@QUALITY@@', product.quality || '@@QUALITY@@')) + .pipe(replace('@@ARCHITECTURE@@', rpmArch)) .pipe(rename('SPECS/' + product.applicationName + '.spec')); var specIcon = gulp.src('resources/linux/rpm/code.xpm', { base: '.' }) diff --git a/resources/linux/rpm/code.spec.template b/resources/linux/rpm/code.spec.template index 32d30425681..d0e6b1e4161 100644 --- a/resources/linux/rpm/code.spec.template +++ b/resources/linux/rpm/code.spec.template @@ -30,6 +30,16 @@ if [ "@@NAME@@" = "code" ]; then rm -f /usr/local/bin/code fi +# Register yum repository +# TODO: #229: Enable once the yum repository is signed +#if [ "@@NAME@@" != "code-oss" ]; then +# if [ -d "/etc/yum.repos.d" ]; then +# REPO_FILE=/etc/yum.repos.d/@@NAME@@.repo +# rm -f $REPO_FILE +# echo -e "[@@NAME@@]\nname=@@NAME_LONG@@\nbaseurl=https://vscode-update.azurewebsites.net/api/rpm/@@QUALITY@@/@@ARCHITECTURE@@/rpm" > $REPO_FILE +# fi +#fi + %files %defattr(-,root,root)