Skip to content
Permalink
Browse files

feat(makers): Ensure all assets outputted by make are versioned

  • Loading branch information
MarshallOfSound committed Apr 21, 2017
1 parent b94890c commit 6dda5179903321810545796cb64e50c6bb6b6347
Showing with 6 additions and 4 deletions.
  1. +2 −2 src/makers/darwin/dmg.js
  2. +2 −2 src/makers/generic/zip.js
  3. +2 −0 src/makers/win32/squirrel.js
@@ -8,10 +8,10 @@ import configFn from '../../util/config-fn';
// appdmg, which is darwin-only
export const isSupportedOnCurrentPlatform = async () => process.platform === 'darwin';

export default async ({ dir, appName, targetArch, forgeConfig }) => {
export default async ({ dir, appName, targetArch, forgeConfig, packageJSON }) => {
const electronDMG = require('electron-installer-dmg');

const outPath = path.resolve(dir, '../make', `${appName}.dmg`);
const outPath = path.resolve(dir, '../make', `${appName}-${packageJSON.version}.dmg`);
await ensureFile(outPath);
const dmgConfig = Object.assign({
overwrite: true,
@@ -21,10 +21,10 @@ const zipPromise = (from, to) =>
});
});

export default async ({ dir, appName, targetPlatform }) => {
export default async ({ dir, appName, targetPlatform, packageJSON }) => {
const zipFolder = require('zip-folder');

const zipPath = path.resolve(dir, '../make', `${path.basename(dir)}.zip`);
const zipPath = path.resolve(dir, '../make', `${path.basename(dir)}-${packageJSON.version}.zip`);
await ensureFile(zipPath);
switch (targetPlatform) {
// This case is tested but not on the coverage reporting platform
@@ -17,12 +17,14 @@ export default async ({ dir, appName, targetArch, forgeConfig, packageJSON }) =>
name: appName,
noMsi: true,
exe: `${appName}.exe`,
setupExe: `${appName}-${packageJSON.version} Setup.exe`,
}, configFn(forgeConfig.electronWinstallerConfig, targetArch), {
appDirectory: dir,
outputDirectory: outPath,
});

await createWindowsInstaller(winstallerConfig);

const artifacts = [
path.resolve(outPath, 'RELEASES'),
path.resolve(outPath, winstallerConfig.setupExe || `${appName}Setup.exe`),

0 comments on commit 6dda517

Please sign in to comment.
You can’t perform that action at this time.