-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (32 loc) · 1.39 KB
/
Makefile
File metadata and controls
37 lines (32 loc) · 1.39 KB
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
36
37
.DEFAULT_GOAL := build
.PHONY: init
init:
docker run --rm -it --user $(id -u):$(id -g) -v "$(shell pwd):/app" dannyben/bashly init
.PHONY: test
test:
@cd test && ./test.sh
# alias bashly='docker run --rm -it --user $(id -u):$(id -g) --volume "$PWD:/app" dannyben/bashly'
.PHONY: build
build:
docker run --rm -it --user $(id -u):$(id -g) -v "$(shell pwd):/app" dannyben/bashly generate
.PHONY: bumpversion
bumpversion:
docker run --rm -it --user $(id -u):$(id -g) -v "$(shell pwd):/app" vikadata/bumpversion bumpversion patch
.PHONY: docker
docker: ## you can run 'make docker DOCKER_HUB_PASSWORD=xxx` to do silent push without prompt
@if [ "$$DOCKER_HUB_PASSWORD" ]; then\
echo "DOCKER_HUB_PASSWORD exist";\
else\
read -p "Enter the password of hub.docker.com user 'vikadata': " DOCKER_HUB_PASSWORD;\
fi;\
VERSION=$(shell cat .version);\
docker build . --tag vikadata/vika.bash:$$VERSION ;\
docker build . --tag vikadata/vika.bash:latest ;\
docker build . --tag ghcr.io/vikadata/vika.bash:$$VERSION ;\
docker build . --tag ghcr.io/vikadata/vika.bash:latest ;\
echo $$DOCKER_HUB_PASSWORD | docker login -u vikadata --password-stdin ;\
docker push vikadata/vika.bash:$$VERSION ;\
docker push vikadata/vika.bash:latest ;\
echo $$DOCKER_HUB_PASSWORD | docker login ghcr.io -u vikadata --password-stdin ;\
docker push ghcr.io/vikadata/vika.bash:$$VERSION ;\
docker push ghcr.io/vikadata/vika.bash:latest