Skip to content

Commit

Permalink
Makefile: update Docker image when toolchain changes
Browse files Browse the repository at this point in the history
Update Docker image whenever we update the toolchange to force rebuild.

Fixes tailscale/corp#26816
Signed-off-by: kari-ts <[email protected]>
  • Loading branch information
kari-ts committed Feb 27, 2025
1 parent 6a3342e commit 6fd04fc
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,19 @@
# with this name, it will be used.
#
# The convention here is tailscale-android-build-amd64-<date>
DOCKER_IMAGE=tailscale-android-build-amd64-191124
#
# Compute a quarterly version string.
year=$(date +%y)
month=$(date +%m)
# Convert month to an integer.
month_int=$(printf "%d" "$month")
# Calculate the quarter's start month:
# Quarter = floor((month-1)/3), then start = (quarter*3)+1.
quarter_start=$(( ((month_int - 1) / 3) * 3 + 1 ))
formatted_quarter=$(printf "%02d" "$quarter_start")

# Set the Docker image name. This will update every 3 months.
DOCKER_IMAGE="tailscale-android-build-amd64-${year}${formatted_quarter}"
export TS_USE_TOOLCHAIN=1

DEBUG_APK=tailscale-debug.apk
Expand Down

0 comments on commit 6fd04fc

Please sign in to comment.