0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-11 02:12:21 -05:00

Added weekly build tasks - closes #211

- updated grunt file with the tasks for running a weekly build
This commit is contained in:
Hannah Wolfe 2013-07-11 15:05:10 +01:00
parent 5948a3f246
commit 3bfeece520

View file

@ -9,9 +9,11 @@ var path = require('path'),
adminAssets: './core/admin/assets', adminAssets: './core/admin/assets',
build: buildDirectory, build: buildDirectory,
nightlyBuild: path.join(buildDirectory, 'nightly'), nightlyBuild: path.join(buildDirectory, 'nightly'),
weeklyBuild: path.join(buildDirectory, 'weekly'),
buildBuild: path.join(buildDirectory, 'build'), buildBuild: path.join(buildDirectory, 'build'),
dist: distDirectory, dist: distDirectory,
nightlyDist: path.join(distDirectory, 'nightly'), nightlyDist: path.join(distDirectory, 'nightly'),
weeklyDist: path.join(distDirectory, 'weekly'),
buildDist: path.join(distDirectory, 'build') buildDist: path.join(distDirectory, 'build')
}, },
@ -97,22 +99,6 @@ var path = require('path'),
shell: { shell: {
bourbon: { bourbon: {
command: 'bourbon install --path <%= paths.adminAssets %>/sass/modules/' command: 'bourbon install --path <%= paths.adminAssets %>/sass/modules/'
},
commitNightly: {
command: 'git commit package.json -m "Nightly build <%= pkg.version %>"'
},
tagNightly: {
command: 'git tag <%= pkg.version %> -a -m "Nightly build <%= pkg.version %>"'
},
pushMaster: {
command: 'git push origin master'
},
pushMasterTags: {
command: 'git push origin master --tags'
} }
}, },
@ -182,6 +168,22 @@ var path = require('path'),
dest: "<%= paths.nightlyBuild %>/<%= pkg.version %>/" dest: "<%= paths.nightlyBuild %>/<%= pkg.version %>/"
}] }]
}, },
weekly: {
files: [{
expand: true,
src: [
'**',
'!node_modules/**',
'!core/shared/data/*.db',
'!.sass*',
'!.af*',
'!.git*',
'!.groc*',
'!.travis.yml'
],
dest: "<%= paths.weeklyBuild %>/<%= pkg.version %>/"
}]
},
build: { build: {
files: [{ files: [{
expand: true, expand: true,
@ -209,6 +211,14 @@ var path = require('path'),
cwd: "<%= paths.nightlyBuild %>/<%= pkg.version %>/", cwd: "<%= paths.nightlyBuild %>/<%= pkg.version %>/",
src: ["**"] src: ["**"]
}, },
weekly: {
options: {
archive: "<%= paths.weeklyDist %>/Ghost-Weekly-<%= pkg.version %>.zip"
},
expand: true,
cwd: "<%= paths.weeklyBuild %>/<%= pkg.version %>/",
src: ["**"]
},
build: { build: {
options: { options: {
archive: "<%= paths.buildDist %>/Ghost-Build.zip" archive: "<%= paths.buildDist %>/Ghost-Build.zip"
@ -265,15 +275,11 @@ var path = require('path'),
grunt.registerTask("docs", ["groc"]); grunt.registerTask("docs", ["groc"]);
/* Nightly builds /* Nightly builds
* - Bump patch version in package.json, * - Do our standard build steps (sass, handlebars, etc)
* - Copy files to build-folder/nightly/#{version} directory * - Bump patch version in package.json, commit, tag and push
* - Copy files to build-folder/#/#{version} directory
* - Clean out unnecessary files (travis, .git*, .af*, .groc*) * - Clean out unnecessary files (travis, .git*, .af*, .groc*)
* - Zip files in build folder to dist-folder/#{version} directory * - Zip files in build folder to dist-folder/#{version} directory
* - git commit package.json -m "Nightly build #{version}"
* - git tag -a -m "Nightly build #{version}"
* - git push origin master
* - git push origin master --tags
* - TODO: POST to pubsubhubub to notify of new build?
*/ */
grunt.registerTask("nightly", [ grunt.registerTask("nightly", [
"shell:bourbon", "shell:bourbon",
@ -283,11 +289,16 @@ var path = require('path'),
"updateCurrentPackageInfo", "updateCurrentPackageInfo",
"copy:nightly", "copy:nightly",
"compress:nightly" "compress:nightly"
/* Caution: shit gets real below here */ ]);
//"shell:commitNightly",
//"shell:tagNightly", grunt.registerTask("weekly", [
//"shell:pushMaster", "shell:bourbon",
//"shell:pushMasterTags" "sass:admin",
"handlebars",
"bump:build",
"updateCurrentPackageInfo",
"copy:weekly",
"compress:weekly"
]); ]);
grunt.registerTask("build", [ grunt.registerTask("build", [