Add yum repository registration

This is currently disabled until the repo is signed

Part of #229
This commit is contained in:
Daniel Imms 2016-04-01 12:29:59 -07:00
parent 5a6113bfa9
commit d23ce88450
2 changed files with 14 additions and 0 deletions

View file

@ -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: '.' })

View file

@ -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)