[MM-58065] Force the packager to create the version directory before packing (#3022)
This commit is contained in:
parent
7c9c462964
commit
e623fd1536
|
@ -40,6 +40,7 @@
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"beforePack": "scripts/beforepack.js",
|
||||||
"afterPack": "scripts/afterpack.js",
|
"afterPack": "scripts/afterpack.js",
|
||||||
"afterAllArtifactBuild": "scripts/afterbuild.js",
|
"afterAllArtifactBuild": "scripts/afterbuild.js",
|
||||||
"deb": {
|
"deb": {
|
||||||
|
|
14
scripts/beforepack.js
Normal file
14
scripts/beforepack.js
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
|
||||||
|
// See LICENSE.txt for license information.
|
||||||
|
|
||||||
|
var fs = require('fs');
|
||||||
|
var path = require('path');
|
||||||
|
|
||||||
|
exports.default = async function beforePack(context) {
|
||||||
|
// The debian packager (fpm) complains when the directory to output the package to doesn't exist
|
||||||
|
// So we have to manually create it first
|
||||||
|
var dir = path.join(context.outDir, context.packager.appInfo.version)
|
||||||
|
if (!fs.existsSync(dir)){
|
||||||
|
fs.mkdirSync(dir);
|
||||||
|
}
|
||||||
|
};
|
Loading…
Reference in a new issue