Skip to content

Commit

Permalink
feat(release-build): Adding build app helper with debug option (still…
Browse files Browse the repository at this point in the history
… WIP!)
  • Loading branch information
hypery2k committed Nov 10, 2017
1 parent ae0df83 commit d3c0f41
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions lib/release.ts
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;
}

0 comments on commit d3c0f41

Please sign in to comment.