Merge pull request #869 from McGiverGim/bf-fix_osx_packages

Fix osx package generation
10.3.x-maintenance
Michael Keller 2018-01-18 11:22:13 +13:00 committed by GitHub
commit 5ee77c04d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 18 additions and 9 deletions

View File

@ -420,14 +420,8 @@ function start_debug(done) {
// Create installer package for windows platforms
function release_win(arch, done) {
// Create the output directory, with write permissions
fs.mkdir(RELEASE_DIR, '0775', function(err) {
if (err) {
if (err.code !== 'EEXIST') {
throw err;
}
}
});
// The makensis does not generate the folder correctly, manually
createDirIfNotExists(RELEASE_DIR);
// Parameters passed to the installer script
const options = {
@ -514,7 +508,11 @@ function release_deb(arch) {
function release_osx64() {
var appdmg = require('gulp-appdmg');
return gulp.src([])
// The appdmg does not generate the folder correctly, manually
createDirIfNotExists(RELEASE_DIR);
// The src pipe is not used
return gulp.src(['.'])
.pipe(appdmg({
target: path.join(RELEASE_DIR, getReleaseFilename('macOS', 'dmg')),
basepath: path.join(APPS_DIR, pkg.name, 'osx64'),
@ -537,6 +535,17 @@ function release_osx64() {
);
}
// Create the dir directory, with write permissions
function createDirIfNotExists(dir) {
fs.mkdir(dir, '0775', function(err) {
if (err) {
if (err.code !== 'EEXIST') {
throw err;
}
}
});
}
// Create a list of the gulp tasks to execute for release
function listReleaseTasks(done) {