Skip to content

Commit

Permalink
Merge pull request #624 from bkleiner/fix-local-targets
Browse files Browse the repository at this point in the history
use local targetsdata for local builds, fixes #580
  • Loading branch information
jurgelenas authored Jun 29, 2024
2 parents 198657d + 2ae8c7a commit 70c01f8
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 70c01f8

Please sign in to comment.