forked from League-Examples/python-devcontainer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (28 loc) · 948 Bytes
/
Makefile
File metadata and controls
35 lines (28 loc) · 948 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
.PHONY: build push ver install publish check-docker
VERSION := "1.20250414.3"
IMAGE_NAME := jtlpython:$(VERSION)
IMAGE_FULL_NAME := ghcr.io/league-examples/$(IMAGE_NAME)
ver:
@echo $(VERSION)
push:
git commit --allow-empty -a -m "Release version $(VERSION)"
git push
git tag v$(VERSION)
git push --tags
install:
@if ! command -v devcontainer >/dev/null 2>&1; then \
echo "Installing @devcontainers/cli globally..."; \
npm install -g @devcontainers/cli; \
else \
echo "devcontainers CLI is already installed."; \
fi
check-docker:
@if ! docker info > /dev/null 2>&1; then \
echo "Error: Docker is not running. Please start Docker and try again."; \
exit 1; \
fi
build: install check-docker
devcontainer build --workspace-folder . --image-name $(IMAGE_FULL_NAME)
publish: check-docker
echo $$GITHUB_TOKEN | docker login ghcr.io -u jointheleague-it --password-stdin
docker push ghcr.io/league-infrastructure/$(IMAGE_NAME)