Commit 833c68b2 authored by Rémi Bèges's avatar Rémi Bèges

Update archive name

parent 666cecac
Pipeline #16558741 passed with stage
in 46 seconds
......@@ -9,9 +9,9 @@ pack:
script:
- node packer.js
artifacts:
name: nodejs-cronobo-startup-pack
name: nodejs-pack
paths:
- cronobo-archive.zip
- nodejs-cronobo-script.zip
only:
- master
- tags
No preview for this file type
......@@ -2,7 +2,8 @@ var fs = require('fs');
var path = require('path');
var archiver = require('archiver');
var glob = require('glob');
var output = fs.createWriteStream(__dirname + '/cronobo-archive.zip');
var archiveName = 'nodejs-cronobo-script.zip';
var output = fs.createWriteStream(__dirname + `/${archiveName}`);
output.on('close', function() {
console.log('Pack completed. Archive size (bytes): ' + archive.pointer());
......@@ -29,7 +30,7 @@ var files = glob.sync('?(*.json|*.js|.dockerignore|Dockerfile|README.md)', {
console.log('Archiving files:');
console.log(files);
console.log('into cronobo-archive.zip');
console.log(`into ${archiveName}`);
for(var i = 0 ; i < files.length ; i++) {
archive.append(fs.createReadStream(files[i]), {name: path.basename(files[i])});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment