Browse Source

rename build arg `TOIT_VERSION` to `TOIT_CLI_VERSION`; makefile: prefix cli version with "toitcli" instead of "toit"

Fabian Peter Hammerle 2 years ago
parent
commit
71c756a2c3
3 changed files with 7 additions and 5 deletions
  1. 2 0
      CHANGELOG.md
  2. 3 3
      Dockerfile
  3. 2 2
      Makefile

+ 2 - 0
CHANGELOG.md

@@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
 and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
 
 ## [Unreleased]
+### Changed
+- renamed build arg `TOIT_VERSION` to `TOIT_CLI_VERSION`
 
 ## [0.1.1] - 2022-02-22
 ### Added

+ 3 - 3
Dockerfile

@@ -30,14 +30,14 @@ FROM docker.io/alpine:3.15.0
 
 # https://web.archive.org/web/20220220103519/https://github.com/hadolint/hadolint/wiki/DL4006
 SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
-ARG TOIT_VERSION=1.18.2
+ARG TOIT_CLI_VERSION=1.18.2
 # hadolint ignore=DL3018
 RUN apk add --no-cache \
         ca-certificates \
         curl \
         gcompat `# toitc` \
         libgcc `# toitc` \
-    && curl https://archive.toit.io/cli/v${TOIT_VERSION}/linux \
+    && curl https://archive.toit.io/cli/v${TOIT_CLI_VERSION}/linux \
         | tar -xvzf - -C /usr/local/bin \
     && apk del ca-certificates curl \
     && adduser -u 1000 -D toit
@@ -47,6 +47,6 @@ CMD ["toit", "--help"]
 
 # https://github.com/opencontainers/image-spec/blob/v1.0.1/annotations.md
 ARG REVISION=
-LABEL org.opencontainers.image.title="toit" \
+LABEL org.opencontainers.image.title="toit cli" \
     org.opencontainers.image.source="https://git.hammerle.me/fphammerle/docker-toit" \
     org.opencontainers.image.revision="$REVISION"

+ 2 - 2
Makefile

@@ -2,7 +2,7 @@
 
 IMAGE_NAME := docker.io/fphammerle/toit
 PROJECT_VERSION = $(shell git describe --match=v* --abbrev=0 --dirty | sed -e 's/^v//')
-TOIT_PACKAGE_VERSION = $(shell grep -Po 'TOIT_VERSION=\K.+' Dockerfile | tr -d -)
+TOIT_CLI_VERSION = $(shell grep -Po 'TOIT_CLI_VERSION=\K.+' Dockerfile | tr -d -)
 ARCH = $(shell arch)
 # architecture[arm_variant]
 # https://github.com/opencontainers/image-spec/blob/v1.0.1/image-index.md#image-index-property-descriptions
@@ -11,7 +11,7 @@ IMAGE_TAG_ARCH_armv6l = armv6
 IMAGE_TAG_ARCH_armv7l = armv7
 IMAGE_TAG_ARCH_x86_64 = amd64
 IMAGE_TAG_ARCH = ${IMAGE_TAG_ARCH_${ARCH}}
-IMAGE_TAG = ${PROJECT_VERSION}-toit${TOIT_PACKAGE_VERSION}-${IMAGE_TAG_ARCH}
+IMAGE_TAG = ${PROJECT_VERSION}-toitcli${TOIT_CLI_VERSION}-${IMAGE_TAG_ARCH}
 BUILD_PARAMS = --tag="${IMAGE_NAME}:${IMAGE_TAG}" \
 	--build-arg=REVISION="$(shell git rev-parse HEAD)"