Created
October 8, 2014 23:27
-
-
Save abuiles/83b260c5fca5c6378a6c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function(grunt) { | |
grunt.initConfig({ | |
env: process.env, | |
s3: { | |
options: { | |
key: '<%= env.AWS_ACCESS_KEY_ID %>', | |
secret: '<%= env.AWS_SECRET_ACCESS_KEY %>', | |
bucket: '<%= env.AWS_BUCKET %>', | |
access: 'public-read', | |
headers: { | |
"Cache-Control": "max-age=630720000, public", | |
"Expires": new Date(Date.now() + 630720000).toUTCString() | |
}, | |
}, | |
dev: { | |
upload: [ | |
{ | |
src: 'dist/assets/**/*', | |
dest: 'mims-app/assets/', | |
rel: 'dist/assets', | |
options: { verify: true } | |
} | |
] | |
} | |
}, | |
redis: { | |
options: { | |
manifestKey: 'releases', | |
manifestSize: 10, | |
host: '<%= env.REDISTOGO_HOST %>', | |
port: '<%= env.REDISTOGO_PORT %>', | |
connectionOptions: { | |
auth_pass: '<%= env.REDISTOGO_PASSWORD %>' | |
} | |
}, | |
canary: { | |
options: { | |
prefix: '<%= gitinfo.local.branch.current.shortSHA %>:', | |
currentDeployKey: '<%= gitinfo.local.branch.current.shortSHA %>', | |
}, | |
files: { | |
src: ["dist/index.html"] | |
} | |
}, | |
release: { | |
options: { | |
prefix: 'release:' | |
}, | |
files: { | |
src: ["dist/index.html"] | |
} | |
} | |
}, | |
}); | |
grunt.loadNpmTasks('grunt-gitinfo'); | |
grunt.loadNpmTasks('grunt-s3'); | |
grunt.loadNpmTasks('grunt-redis'); | |
grunt.registerTask('release', ['gitinfo', 'redis:release']); | |
grunt.registerTask('canary', ['gitinfo', 'redis:canary']); | |
grunt.registerTask('deploy-release', ['default', 'release']); | |
return grunt.registerTask('default', ['gitinfo', 's3:dev', 'canary']); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment