Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Node.js to 20.10.0 LTS and replace appdmg with macdmg #3333

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.17.0
20.10.0
31 changes: 0 additions & 31 deletions gulp-appdmg.js

This file was deleted.

24 changes: 11 additions & 13 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ const rollup = require('rollup');
const yarn = require("gulp-yarn");
const rename = require('gulp-rename');
const replace = require('gulp-replace');
const jeditor = require("gulp-json-editor");
const xmlTransformer = require("gulp-xml-transformer");
const jeditor = require('gulp-json-editor');
const xmlTransformer = require('gulp-xml-transformer');
const os = require('os');
const git = require('simple-git')();
const source = require('vinyl-source-stream');
Expand All @@ -30,7 +30,7 @@ const prompt = require('gulp-prompt');
const less = require('gulp-less');
const sourcemaps = require('gulp-sourcemaps');

const cordova = require("cordova-lib").cordova;
const cordova = require('cordova-lib').cordova;

const DIST_DIR = './dist/';
const APPS_DIR = './apps/';
Expand Down Expand Up @@ -278,8 +278,6 @@ function processPackage(done, gitRevision, isReleaseBuild) {

const pkg = require('./package.json');

// remove gulp-appdmg from the package.json we're going to write
delete pkg.optionalDependencies['gulp-appdmg'];
// keeping this package in `package.json` for some reason
// breaks the nwjs builds. This is not really needed for
// nwjs nor it's imported anywhere at runtime ¯\_(ツ)_/¯
Expand Down Expand Up @@ -848,30 +846,30 @@ function getLinuxPackageArch(type, arch) {
}
// Create distribution package for macOS platform
function release_osx64(appDirectory) {
const appdmg = require('./gulp-appdmg');
const macdmg = require('gulp-macdmg');

// The appdmg does not generate the folder correctly, manually
// appdmg does not generate the folder correctly, manually
createDirIfNotExists(RELEASE_DIR);

// The src pipe is not used
return gulp.src(['.'])
.pipe(appdmg({
.pipe(macdmg({
target: path.join(RELEASE_DIR, getReleaseFilename('macOS', 'dmg')),
basepath: path.join(appDirectory, metadata.name, 'osx64'),
specification: {
title: 'Betaflight Configurator',
contents: [
{ 'x': 448, 'y': 342, 'type': 'link', 'path': '/Applications' },
{ 'x': 192, 'y': 344, 'type': 'file', 'path': `${metadata.name}.app`, 'name': 'Betaflight Configurator.app' },
],
background: path.join(__dirname, 'assets/osx/dmg-background.png'),
format: 'UDZO',
window: {
size: {
width: 638,
height: 479,
},
},
format: 'UDZO',
contents: [
{ 'x': 448, 'y': 342, 'type': 'link', 'path': '/Applications' },
{ 'x': 192, 'y': 344, 'type': 'file', 'path': `${metadata.name}.app`, 'name': 'Betaflight Configurator.app' },
],
},
}),
);
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
"release:windows": "set NODE_ENV=production&& gulp release",
"pretest": "yarn run lint",
"test": "vitest",
"lint": "eslint --ext .js,.vue src gulpfile.js gulp-appdmg.js",
"lint:fix": "eslint --fix src gulpfile.js gulp-appdmg.js",
"lint": "eslint --ext .js,.vue src gulpfile.js",
"lint:fix": "eslint --fix src gulpfile.js",
"storybook": "start-storybook -p 6006"
},
"window": {
Expand Down Expand Up @@ -53,7 +53,7 @@
"author": "The Betaflight open source project.",
"license": "GPL-3.0",
"engines": {
"node": "16.x"
"node": "20.x"
},
"dependencies": {
"@fortawesome/fontawesome-free": "^5.13.0",
Expand Down Expand Up @@ -139,7 +139,7 @@
"yarn": "^1.22.19"
},
"optionalDependencies": {
"appdmg": "^0.6.4"
"gulp-macdmg": "^0.0.1"
},
"resolutions": {
"jquery": "3.6.3",
Expand Down
20 changes: 15 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3519,10 +3519,10 @@ app-root-dir@^1.0.2:
resolved "https://registry.yarnpkg.com/app-root-dir/-/app-root-dir-1.0.2.tgz#38187ec2dea7577fff033ffcb12172692ff6e118"
integrity sha512-jlpIfsOoNoafl92Sz//64uQHGSyMrD2vYG5d8o2a4qGvyNCvXur7bzIsWtAC/6flI2RYAp3kv8rsfBtaLm7w0g==

appdmg@^0.6.4:
version "0.6.6"
resolved "https://registry.yarnpkg.com/appdmg/-/appdmg-0.6.6.tgz#d06bd82b530032fd7a8f0970a1c6ee6196e1efce"
integrity sha512-GRmFKlCG+PWbcYF4LUNonTYmy0GjguDy6Jh9WP8mpd0T6j80XIJyXBiWlD0U+MLNhqV9Nhx49Gl9GpVToulpLg==
[email protected].0:
version "0.6.0"
resolved "https://registry.yarnpkg.com/appdmg/-/appdmg-0.6.0.tgz#81b3beab624ab458e6104d87c5cfa4b172203821"
integrity sha512-vDz8cMf5c6BfoS72OmmHzzuxG5DFVDM6YCAkscjYh3GASGEBBRCZ10Bn515ZPSPHOpfI9Xu3MlApbd49C58pJg==
dependencies:
async "^1.4.2"
ds-store "^0.1.5"
Expand Down Expand Up @@ -7040,7 +7040,7 @@ extsprintf@^1.2.0, extsprintf@^1.4.0:
resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.1.tgz#8d172c064867f235c0c84a596806d279bf4bcc07"
integrity sha512-Wrk35e8ydCKDj/ArClo1VrPVmN8zph5V4AtHwIuHhvMXsKf73UT3BOD+azBIW+3wOJ4FhEH7zyaJCFvChjYvMA==

fancy-log@^1.1.0, fancy-log@^1.3.2:
fancy-log@^1.1.0, fancy-log@^1.3.2, fancy-log@^1.3.3:
version "1.3.3"
resolved "https://registry.yarnpkg.com/fancy-log/-/fancy-log-1.3.3.tgz#dbc19154f558690150a23953a0adbd035be45fc7"
integrity sha512-k9oEhlyc0FrVh25qYuSELjr8oxsCoc4/LEZfg2iJJrfEk/tZL9bCoJE47gqAvI2m/AUjluCS4+3I0eTx8n3AEw==
Expand Down Expand Up @@ -8079,6 +8079,16 @@ gulp-less@^5.0.0:
through2 "^4.0.0"
vinyl-sourcemaps-apply "^0.2.0"

gulp-macdmg@^0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/gulp-macdmg/-/gulp-macdmg-0.0.1.tgz#ccb51296521118122a28d0f856d33e9139d4bef6"
integrity sha512-dIiujjp7XPvISRHijWExzMP2+SpFR623nbGhy/tK9WtyYcFdiFC2NUWqvP+VwcT2hsLkdGWJvy3frkBztC31CQ==
dependencies:
appdmg "0.6.0"
fancy-log "^1.3.3"
plugin-error "^1.0.1"
through2 "^3.0.1"

gulp-prompt@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/gulp-prompt/-/gulp-prompt-1.2.0.tgz#8f716dd16efc7464f90d9a82fde9dd7e835ee12e"
Expand Down