| 1234567891011121314151617181920212223242526272829303132333435363738394041424344 | # location-guessing-game-telegram-bot - Telegram Bot Sending Random Wikimedia Commons Photos## Copyright (C) 2021 Fabian Peter Hammerle <fabian@hammerle.me>## This program is free software: you can redistribute it and/or modify# it under the terms of the GNU General Public License as published by# the Free Software Foundation, either version 3 of the License, or# any later version.## This program is distributed in the hope that it will be useful,# but WITHOUT ANY WARRANTY; without even the implied warranty of# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the# GNU General Public License for more details.## You should have received a copy of the GNU General Public License# along with this program.  If not, see <https://www.gnu.org/licenses/>.# sync with https://github.com/fphammerle/switchbot-mqtt/blob/master/MakefileIMAGE_NAME = docker.io/fphammerle/location-guessing-game-telegram-botPROJECT_VERSION = $(shell git describe --match=v* --always --dirty | sed -e 's/^v//')ARCH = $(shell arch)# architecture[arm_variant]# https://github.com/opencontainers/image-spec/blob/v1.0.1/image-index.md#image-index-property-descriptionsIMAGE_TAG_ARCH_aarch64 = arm64IMAGE_TAG_ARCH_armv6l = armv6IMAGE_TAG_ARCH_armv7l = armv7IMAGE_TAG_ARCH_x86_64 = amd64IMAGE_TAG_ARCH = ${IMAGE_TAG_ARCH_${ARCH}}IMAGE_TAG = ${PROJECT_VERSION}-${IMAGE_TAG_ARCH}.PHONY: docker-build podman-build docker-pushdocker-build:	sudo docker build --tag="${IMAGE_NAME}:${IMAGE_TAG}" .podman-build:	# --format=oci (default) not fully supported by hub.docker.com	# https://github.com/docker/hub-feedback/issues/1871#issuecomment-748924149	podman build --format=docker --tag="${IMAGE_NAME}:${IMAGE_TAG}" .docker-push: docker-build	sudo docker push "${IMAGE_NAME}:${IMAGE_TAG}"	@echo git tag --sign --message '$(shell sudo docker image inspect --format '{{join .RepoDigests "\n"}}' "${IMAGE_NAME}:${IMAGE_TAG}")' docker/${IMAGE_TAG} $(shell git rev-parse HEAD)
 |