Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enter text to prompt #203

Closed
sean-hill opened this issue Apr 29, 2015 · 3 comments
Closed

Enter text to prompt #203

sean-hill opened this issue Apr 29, 2015 · 3 comments

Comments

@sean-hill
Copy link

Hey there,

I'm trying to automate a build process for Android apps with gulp. Here is the gulp task I have wrapped around shelljs:

gulp.task('jarsign-android', function(callback){
    var command = 'jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore release-key.keystore <path-to-apk> release';
    sh.exec(command, callback);
});

However the jarsigner command asks for the password to the keystore file with a prompt:

Enter Passphrase for keystore:

Is there a way to pipe in commands from the terminal while using the sh.exec command?

@iolufemi
Copy link

iolufemi commented May 3, 2015

+1

@iolufemi
Copy link

iolufemi commented May 4, 2015

Save your passphrase in a file, eg. passkey.txt

Then use the command like this;

var command = 'jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore release-key.keystore <path-to-apk> release < passkey.txt';

@sean-hill
Copy link
Author

Sweet thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants