-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
52 lines (43 loc) · 1.32 KB
/
justfile
File metadata and controls
52 lines (43 loc) · 1.32 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name := "rssbridge"
user := `whoami`
docker-image := env("DOCKER_IMAGE", user/name)
# show this help message
help:
@just --list
# run an auto reloading development instance
[unix]
[positional-arguments]
dev *args:
@just _require_executable entr
while sleep .2; do find internal main.go | entr -c -d -r go run . -- "$@"; done
# build binaries
build:
go build -o ./bin/rssbridge .
# build image
[group("docker")]
do-build: build
docker build \
--label "org.opencontainers.image.created=$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
--label "org.opencontainers.image.authors=$(git config user.name)" \
--label "org.opencontainers.image.source=$(git remote get-url origin)" \
--label "org.opencontainers.image.version=$(git describe --tags --always --dirty)" \
-t {{docker-image}}:nightly \
.
# start container from image
[group("docker")]
do-run:
docker run --rm --name rssbridge -p 3000:3000 rssbridge:nightly
# tag image with :latest and push it
[group("docker")]
do-publish:
docker tag {{docker-image}}:nightly {{docker-image}}:latest
docker push {{docker-image}}:latest
[private]
[unix]
_require_executable cmd:
#!/bin/sh
if ! type "{{cmd}}" > /dev/null; then
printf "\033[31merror:\033[0m command \`\033[32m%s\033[0m\` not found. Check if it is installed and available in your \$PATH.\n" "{{cmd}}" >&2
exit 1
fi
# vi: noet