Skip to content

Commit

Permalink
Merge pull request #416 from lamarios/feature/switch_to_nix_for_bundl…
Browse files Browse the repository at this point in the history
…etool

Feature/switch to nix for bundletool
  • Loading branch information
lamarios authored Dec 17, 2023
2 parents ed95ef6 + b9d6c26 commit 79dd68e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,19 @@ steps:
when:
event: tag
- name: Accrescent APKs
image: nixos/nix
image: gonzague/bundletool
environment:
ANDROID_KEY_FILE: /tmp/key.properties
SERVER_URL:
from_secret: server_url
commands:
- nix-env -iA nixpkgs.wget nixpkgs.bundletool
- mkdir /tmp
- wget http://$SERVER_URL/service-account.json -O /tmp/service-account.json
- wget http://$SERVER_URL/key.properties -O /tmp/key.properties
- wget http://$SERVER_URL/keystore.jks -O /tmp/keystore.jks
- . /tmp/key.properties
- cd build/app/outputs/bundle/release/
- bundletool build-apks --bundle=app-release.aab --output=app-release.apks --ks-pass=pass:$${storePassword} --ks=/tmp/keystore.jks --ks-key-alias=upload --key-pass=pass:$${keyPassword}
- bundletool build-apks --bundle=app-release.aab --output=app-release.apks --ks-pass=pass:$${storePassword} --ks=/tmp/keystore.jks --ks-key-alias=upload --key-pass=pass:$${keyPassword} --aapt2=/bin/aapt2
when:
event: tag
- name: Publish
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,4 @@ app.*.map.json
/android/app/debug
/android/app/profile
/android/app/release
/docker/result
13 changes: 13 additions & 0 deletions docker/bundletool.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# usage:
# build the image
# nix-build -o result bundletool.nix
# docker load -i result
# use the image as usual with name gonzague/bundletool
{
pkgs ? import <nixpkgs> {system = "x86_64-linux";}
}:
pkgs.dockerTools.buildLayeredImage {
name = "gonzague/bundletool";
tag = "latest";
contents = with pkgs; [ toybox wget bundletool aapt bash android-tools ];
}

0 comments on commit 79dd68e

Please sign in to comment.