diff --git a/build.js b/build.js index 92d99e9..45a285c 100644 --- a/build.js +++ b/build.js @@ -8,6 +8,7 @@ var fs = require('fs'); var archiver = require('archiver'); var sha1sum = require('shasum'); var copyFile = require('fast-copy-file'); +var dateformat = require('dateformat'); var config = require('./config'); var distDir = 'dist'; @@ -83,6 +84,7 @@ function buildProject(projectPath, remotePath) { var iconFilename = base + '.png'; var srcIcon = path.join(projectPath, 'icon.png'); var dstIcon = path.join(distDir, iconFilename); + var timestamp = '?t=' + dateformat(new Date(), 'yyyymmddHHMMss'); compress(projectPath, outputPath, function(compressedSize, sha1sum) { @@ -101,8 +103,8 @@ function buildProject(projectPath, remotePath) { } deferred.resolve({ - file: remotePath + zipFilename, - icon: remotePath + iconFilename, + file: remotePath + zipFilename + timestamp, + icon: remotePath + iconFilename + timestamp, size: compressedSize, sha1: sha1sum, name: name, diff --git a/package.json b/package.json index 8ae6cda..62fe790 100644 --- a/package.json +++ b/package.json @@ -15,11 +15,12 @@ ], "author": "Mozilla", "license": "Apache 2", - "devDependencies": { + "dependencies": { + "archiver": "~0.5.1", + "dateformat": "^1.0.8-1.2.3", + "fast-copy-file": "0.0.1", "glob": "~3.2.8", "q": "~1.0.0", - "archiver": "~0.5.1", - "shasum": "~1.0.0", - "fast-copy-file": "0.0.1" + "shasum": "~1.0.0" } }