[MM-58065] Force the packager to create the version directory before packing (#3022)
This commit is contained in:
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);
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user