mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-20 23:05:15 +03:00
Merge pull request #869 from McGiverGim/bf-fix_osx_packages
Fix osx package generation
This commit is contained in:
commit
5ee77c04d6
1 changed files with 18 additions and 9 deletions
27
gulpfile.js
27
gulpfile.js
|
@ -420,14 +420,8 @@ function start_debug(done) {
|
||||||
// Create installer package for windows platforms
|
// Create installer package for windows platforms
|
||||||
function release_win(arch, done) {
|
function release_win(arch, done) {
|
||||||
|
|
||||||
// Create the output directory, with write permissions
|
// The makensis does not generate the folder correctly, manually
|
||||||
fs.mkdir(RELEASE_DIR, '0775', function(err) {
|
createDirIfNotExists(RELEASE_DIR);
|
||||||
if (err) {
|
|
||||||
if (err.code !== 'EEXIST') {
|
|
||||||
throw err;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// Parameters passed to the installer script
|
// Parameters passed to the installer script
|
||||||
const options = {
|
const options = {
|
||||||
|
@ -514,7 +508,11 @@ function release_deb(arch) {
|
||||||
function release_osx64() {
|
function release_osx64() {
|
||||||
var appdmg = require('gulp-appdmg');
|
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({
|
.pipe(appdmg({
|
||||||
target: path.join(RELEASE_DIR, getReleaseFilename('macOS', 'dmg')),
|
target: path.join(RELEASE_DIR, getReleaseFilename('macOS', 'dmg')),
|
||||||
basepath: path.join(APPS_DIR, pkg.name, 'osx64'),
|
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
|
// Create a list of the gulp tasks to execute for release
|
||||||
function listReleaseTasks(done) {
|
function listReleaseTasks(done) {
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue