Skip to content

Commit

Permalink
A few build and readme tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
oxtoacart committed Feb 13, 2016
1 parent 51cd26f commit 1dd7cea
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,5 @@ local.properties
.DS_Store
.gradle
build
keystore.release.jks

10 changes: 6 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,12 @@ require-version:
require-gh-token:
@if [[ -z "$$GH_TOKEN" ]]; then echo "GH_TOKEN environment value is required."; exit 1; fi

require-secrets:
@if [[ -z "$$BNS_CERT_PASS" ]]; then echo "BNS_CERT_PASS environment value is required."; exit 1; fi && \
require-secrets-dir:
if [[ -z "$$SECRETS_DIR" ]]; then echo "SECRETS_DIR environment value is required."; exit 1; fi

require-secrets: require-secrets-dir
@if [[ -z "$$BNS_CERT_PASS" ]]; then echo "BNS_CERT_PASS environment value is required."; exit 1; fi

require-lantern-binaries:
@if [[ ! -d "$(LANTERN_BINARIES_PATH)" ]]; then \
echo "Missing lantern binaries repository (https://github.com/getlantern/lantern-binaries). Set it with LANTERN_BINARIES_PATH=\"/path/to/repository\" make ..." && \
Expand Down Expand Up @@ -578,7 +580,7 @@ $(LANTERN_MOBILE_ANDROID_DEBUG): $(LANTERN_MOBILE_TUN2SOCKS) $(LANTERN_MOBILE_AN

$(LANTERN_MOBILE_ANDROID_RELEASE): $(LANTERN_MOBILE_TUN2SOCKS) $(LANTERN_MOBILE_ANDROID_LIB) $(LANTERN_MOBILE_ANDROID_SDK)
@echo "Generating distribution package for android..."
cp $$SECRETS_DIR/android/keystore.release.jks $(LANTERN_MOBILE_DIR)/app
ln -s $$SECRETS_DIR/android/keystore.release.jks $(LANTERN_MOBILE_DIR)/app
cd $(LANTERN_MOBILE_DIR)/app
cp $(ANDROID_SDK_ANDROID_LIB) $(LANTERN_MOBILE_LIBS)
gradle -PlanternVersion=$$VERSION -b $(LANTERN_MOBILE_DIR)/app/build.gradle \
Expand All @@ -588,7 +590,7 @@ $(LANTERN_MOBILE_ANDROID_RELEASE): $(LANTERN_MOBILE_TUN2SOCKS) $(LANTERN_MOBILE_

android-debug: $(LANTERN_MOBILE_ANDROID_DEBUG)

android-release: require-version require-secrets $(LANTERN_MOBILE_ANDROID_RELEASE)
android-release: require-version require-secrets-dir $(LANTERN_MOBILE_ANDROID_RELEASE)

android-install: $(LANTERN_MOBILE_ANDROID_DEBUG)
adb install -r $(LANTERN_MOBILE_ANDROID_DEBUG)
Expand Down
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ Lantern on Windows is distributed as an installer built with
[nsis](http://nsis.sourceforge.net/). The installer is built and signed with
`make package-windows`.

For `make package-windows` to be able to sign the executable, the environment varaibles
For `make package-windows` to be able to sign the executable, the environment variables
`SECRETS_DIR` and `BNS_CERT_PASS` must be set to point to the secrets directory
and the
[password](https://github.com/getlantern/too-many-secrets/blob/master/build-installers/env-vars.txt#L3)
Expand Down Expand Up @@ -320,15 +320,18 @@ make android-install

## Release

To create a release build, add the following to your
``gradle.properties`` file:
To create a release build, add the following to your
``~/.gradle/gradle.properties`` file:

```
KEYSTORE_PWD=$KEYSTORE_PASSWORD
KEYSTORE_FILE=keystore.release.jks
KEY_PWD=$KEY_PASSWORD
```

You can find the exact values to add to your gradle.properties
[here](https://github.com/getlantern/too-many-secrets/blob/master/android/keystore).

Then it can be built with:

```sh
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#Wed Feb 10 03:01:48 PST 2016
VERSION_CODE=1
#Fri Feb 12 19:43:11 CST 2016
VERSION_CODE=4

0 comments on commit 1dd7cea

Please sign in to comment.