Skip to content

Commit

Permalink
Merge 799c8a3 into 31f87b7
Browse files Browse the repository at this point in the history
  • Loading branch information
thostetler committed Oct 25, 2017
2 parents 31f87b7 + 799c8a3 commit 2bdf2e0
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ module.exports = function(grunt) {
pkg: grunt.file.readJSON('package.json'),
local: grunt.file.exists('local-config.json') ? grunt.file.readJSON('local-config.json') : {}
},
loadGruntTasks: {
pattern: 'grunt-*',
config: 'package.json',
scope: 'devDependencies'
jitGrunt: {
staticMappings: {
express: 'grunt-express-server',
hash_require: 'grunt-hash-required',
buildcontrol: 'grunt-build-control'
}
}
});

Expand Down
20 changes: 20 additions & 0 deletions grunt/aliases.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -131,3 +131,23 @@ release:
- 'copy:keep_original'
- 'copy:bumblebee_app'
- 'assemble'

deploy:
tasks:
- 'deploy:master'
- 'exec:kubernetes-build'
- 'release'
- 'deploy:kubernetes'
- 'exec:return-to-working-branch'

'deploy:master':
description: 'deploy master onto build repo'
tasks:
- 'clean:deploy'
- 'buildcontrol:master'

'deploy:kubernetes':
description: 'deploy kubernetes onto build repo'
tasks:
- 'clean:deploy'
- 'buildcontrol:kubernetes'
31 changes: 31 additions & 0 deletions grunt/buildcontrol.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
'use strict';
/**
* Options for the `buildcontrol` grunt task
* This task pushes compiled assets to the bbb-builds repo
*
* @module grunt/buildcontrol
*/
module.exports = {
options: {
dir: 'dist',
commit: true,
push: true,
force: true,
connectCommits: false,
shallowFetch: true,
message: 'Built %sourceName% from commit %sourceCommit% on branch %sourceBranch%'
},
kubernetes: {
options: {
remote: 'git@github.com:adsabs/bbb-builds.git',
branch: 'kubernetes',
message: 'Built %sourceName% from commit %sourceCommit% on branch kubernetes'
}
},
master: {
options: {
remote: 'git@github.com:adsabs/bbb-builds.git',
branch: 'master'
}
}
};
11 changes: 11 additions & 0 deletions grunt/clean.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@ module.exports = {
release: {
src: ['dist/']
},
deploy: {
src: [
'dist/**/*',
'!dist/bumblebee_app.*.js',
'!dist/styles',
'!dist/styles/css',
'!dist/styles/css/styles.*.css',
'!dist/index.*.html',
'dist/index.original.html',
]
},
bower: {
src: [
'./bower_components',
Expand Down
6 changes: 6 additions & 0 deletions grunt/exec.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,11 @@ module.exports = {
},
'coveralls-report': {
cmd: 'cat test/coverage/reports/lcov/lcov.info | ./node_modules/coveralls/bin/coveralls.js'
},
'kubernetes-build': {
cmd: 'git checkout kubernetes && git rebase origin master'
},
'return-to-working-branch': {
cmd: 'git checkout -'
}
};
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"grunt-bbb-requirejs": "0.1.0-alpha.8",
"grunt-blanket-mocha": "^0.4.1",
"grunt-bower-task": "~0.4.0",
"grunt-build-control": "^0.7.1",
"grunt-compile-handlebars": "^2.0.2",
"grunt-concurrent": "^0.5.0",
"grunt-contrib-clean": "~0.5.0",
Expand Down

0 comments on commit 2bdf2e0

Please sign in to comment.