forked from holisticon/nativescript-buildhelper
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(release-build): Adding build app helper with debug option (still…
… WIP!)
- Loading branch information
Showing
1 changed file
with
30 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/usr/bin/env node | ||
import { exec } from 'child_process'; | ||
|
||
|
||
|
||
|
||
/** | ||
* Builds the current app | ||
* @param release set to true if a release build is needed, involves the correct code signing | ||
* @param keyStorePath path to Android KeyStore | ||
* @param keyStorePassword KeyStore password | ||
* @param keyStoreAlias KeyStore alias | ||
* @param keyStoreAliasPassword KeyStore alias password | ||
* @param debug set to true to build a version of the app for debugging purposes | ||
* | ||
*/ | ||
export function buildApp(release: boolean, keyStorePath: string, keyStorePassword: string, keyStoreAlias: string, keyStoreAliasPassword: string, debug = false): Promise<any> { | ||
let promise = new Promise((resolve, reject) => { | ||
// Adding debug AAR if needed | ||
if (debug) { | ||
exec('cd platforms/android/libs/runtime-libs/ && rm -r nativescript-optimized.aar && mv nativescript-regular.aar nativescript-optimized.aar', (err) => { | ||
if (err) { | ||
throw err; | ||
} | ||
}); | ||
} | ||
// TODO trigger normal build | ||
}); | ||
return promise; | ||
} |