Created
January 20, 2014 11:11
-
-
Save kuwabarahiroshi/8518384 to your computer and use it in GitHub Desktop.
Androidアプリをビルドするときにantを使って署名付APKを作成するシェルスクリプト。
brewでandroid-sdkをインストールしている前提です。
署名する際にkeystoreファイルのパスワードを求められますが、expectコマンドで自動化しています。
This file contains hidden or 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
#! /bin/bash | |
expect -f - <<EOD | |
set timeout -1 | |
set pass "YOUR-PASSWORD" | |
spawn ant -f build.xml clean release -Dsdk.dir=$(brew --prefix android-sdk) | |
expect "(store:production.keystore):" { send "\$pass\r" } | |
expect "Please enter password for alias 'mykey':" { send "\$pass\r" } | |
expect eof | |
catch wait result | |
exit [lindex \$result 3] | |
EOD |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment