forked from codewars/codewars-runner-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpush.js
26 lines (23 loc) · 841 Bytes
/
push.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
//! Simple utility for pushing latest docker image with version tagged
var docker = require('./lib/docker'),
opts = require("nomnom")
.options({
image: {
abbr: 'i',
help: 'The image to push. No tag needed, it will automatically be appended. If empty the default will be used.'
},
version: {
abbr: 'v',
flag: true,
help: 'Print version and exit',
callback: function () {
return config.version
}
}
})
.help('This utility will rebuild the docker image for the latest version')
.parse();
console.log('Pushing image, this may take a while...');
docker.push(opts.image, function(code) {
console.log('Process finished');
});