Skip to content

Commit da97f3c

Browse files
committed
Merge pull request #124 from cloudspace/fix_tagged_deploys
Deploy on tags no matter the branch name
2 parents fdb7c9c + 01a114b commit da97f3c

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

Gruntfile.js

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -519,13 +519,20 @@ module.exports = function (grunt) {
519519
});
520520

521521
grunt.registerTask('deploy', function(env) {
522+
// will set aws.env to production if
523+
// this is a git tag.
524+
grunt.task.run('shell:isGitTag');
525+
522526
var repo = process.env.TRAVIS_REPO_SLUG;
523527
var branch = process.env.TRAVIS_BRANCH;
528+
524529
if (repo && repo !== 'cloudspace/angular.crunchinator.com') {
525530
return;
526531
}
527-
if (branch && branch !== 'master') {
528-
return;
532+
if(aws.env !== 'production') {
533+
if (branch && branch !== 'master') {
534+
return;
535+
}
529536
}
530537

531538
if (!aws.key) {
@@ -535,9 +542,7 @@ module.exports = function (grunt) {
535542
throw new Error('You must specify a `AWS_SECRET_ACCESS_KEY` ENV variable.');
536543
}
537544

538-
// will set aws.env to production if
539-
// this is a git tag.
540-
grunt.task.run('shell:isGitTag');
545+
541546
env = env || aws.env || 'staging';
542547

543548
if (env === 'production') {

0 commit comments

Comments
 (0)