Skip to content

Commit

Permalink
use local targetsdata for local builds, fixes #580
Browse files Browse the repository at this point in the history
  • Loading branch information
bkleiner committed Jun 29, 2024
1 parent 198657d commit 2ae8c7a
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import extractZip from 'extract-zip';
import { Service } from 'typedi';
import path from 'path';
import { existsSync } from 'fs';
import { mkdirp } from 'mkdirp';
import semver from 'semver';
import FirmwareSource from '../../../models/enum/FirmwareSource';
Expand Down Expand Up @@ -164,6 +165,13 @@ export default class DeviceDescriptionsLoader {
gitPath,
});

if (
args.source === FirmwareSource.Local &&
existsSync(path.join(args.localPath, 'hardware'))
) {
return path.join(args.localPath, 'hardware');
}

if (gitRepository.hardwareArtifactUrl) {
const workingDir = path.join(gitRepositoryPath, 'hardware');
await mkdirp(workingDir);
Expand Down

0 comments on commit 2ae8c7a

Please sign in to comment.