1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-26 01:35:28 +03:00

Fix osx package generation

This commit is contained in:
Miguel Angel Mulero Martinez 2018-01-17 16:38:41 +01:00
parent 53043a3c33
commit f2fef0f2ee

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) {