Skip to content

Commit e195def

Browse files
authored
android: fix clean build (#499)
updates tailscale/corp#17686 'make clean' will now purge the cached toolchain to ensure you're using the right go version when switching branches. make clean is run in CI before building anything and the docker container name is updated to pick that up. Signed-off-by: Jonathan Nobels <[email protected]>
1 parent aaecc62 commit e195def

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

Makefile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
# The docker image to use for the build environment. Changing this
99
# will force a rebuild of the docker image. If there is an existing image
1010
# with this name, it will be used.
11-
DOCKER_IMAGE=tailscale-android-build-amd64-go1.23
11+
#
12+
# The convention here is tailscale-android-build-amd64-<date>
13+
DOCKER_IMAGE=tailscale-android-build-amd64-120924
1214
export TS_USE_TOOLCHAIN=1
1315

1416
DEBUG_APK=tailscale-debug.apk
@@ -274,7 +276,11 @@ docker-remove-shell-image: ## Removes all docker shell image
274276

275277
.PHONY: clean
276278
clean: ## Remove build artifacts. Does not purge docker build envs. Use dockerRemoveEnv for that.
277-
-rm -rf android/build $(DEBUG_APK) $(RELEASE_AAB) $(RELEASE_TV_AAB) $(LIBTAILSCALE) android/libs *.apk *.aab
279+
clean: ## Remove build artifacts. Does not purge docker build envs. Use dockerRemoveEnv for that.
280+
@echo "Cleaning up old build artifacts"
281+
-rm -rf android/build $(DEBUG_APK) $(RELEASE_AAB) $(RELEASE_TV_AAB) $(LIBTAILSCALE) android/libs *.apk *.aab
282+
@echo "Cleaning cached toolchain"
283+
-rm -rf $(HOME)/.cache/tailscale-go
278284
-pkill -f gradle
279285

280286
.PHONY: help

docker/DockerFile.amd64-build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,5 @@ COPY android/gradle android/gradle
4242
RUN ./android/gradlew
4343

4444
# Build the android app, bump the playstore version code, and make the tv release
45-
CMD make release && make bump_version_code && make release-tv
45+
CMD make clean && make release && make bump_version_code && make release-tv
4646

0 commit comments

Comments
 (0)