This repository has been archived by the owner on Dec 19, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dffe9ae
commit ca2dc76
Showing
3 changed files
with
15 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,11 @@ | ||
const { exec } = require('child_process'); | ||
const semver = require('semver'); | ||
|
||
exec('tns --version', (err, stdout, stderr) => { | ||
console.log(`executing 'ns plugin build'`); | ||
exec('ns plugin build', (err, stdout, stderr) => { | ||
if (err) { | ||
// node couldn't execute the command | ||
console.log(`tns --version err: ${err}`); | ||
console.log(`${err}`); | ||
return; | ||
} | ||
|
||
const tnsVersion = semver.major(stdout); | ||
|
||
// execute 'tns plugin build' for {N} version > 4. This command builds .aar in platforms/android folder. | ||
if (tnsVersion >= 4) { | ||
console.log(`executing 'tns plugin build'`); | ||
exec('tns plugin build', (err, stdout, stderr) => { | ||
if (err) { | ||
// node couldn't execute the command | ||
console.log(`${err}`); | ||
return; | ||
} | ||
}); | ||
} | ||
}); |