mirror of
https://github.com/atom/atom.git
synced 2026-01-23 05:48:10 -05:00
Populate atom.nuspec with the current Atom version
This commit is contained in:
@@ -13,8 +13,14 @@ module.exports = (grunt) ->
|
||||
buildDir = grunt.config.get('atom.buildDir')
|
||||
atomDir = path.join(buildDir, 'Atom')
|
||||
|
||||
packageInfo = JSON.parse(fs.readFileSync(path.join(atomDir, 'resources', 'app', 'package.json'), {encoding: 'utf8'}))
|
||||
inputTemplate = fs.readFileSync(path.join('build', 'windows', 'atom.nuspec.hbs'), {encoding: 'utf8'})
|
||||
|
||||
targetNuspecPath = path.join(buildDir, 'atom.nuspec')
|
||||
fs.writeFileSync(targetNuspecPath, inputTemplate.replace(/{{version}}/, packageInfo.version))
|
||||
|
||||
cmd = 'build/windows/nuget.exe'
|
||||
args = ['pack', './build/windows/atom.nuspec', '-BasePath', atomDir, '-OutputDirectory', buildDir]
|
||||
args = ['pack', targetNuspecPath, '-BasePath', atomDir, '-OutputDirectory', buildDir]
|
||||
|
||||
spawn {cmd, args}, (error, result, code) ->
|
||||
if error?
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>atom</id>
|
||||
<version>0.123.0</version>
|
||||
<version>{{version}}</version>
|
||||
<authors>The Atom Community</authors>
|
||||
<owners>The Atom Community</owners>
|
||||
<iconUrl>http://f.cl.ly/items/0X3B1j1j010I0X1p3l0S/atom.ico</iconUrl>
|
||||
Reference in New Issue
Block a user