-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile.release
32 lines (24 loc) · 720 Bytes
/
Makefile.release
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
ARTIFACT_NAME = camunda-rcc-worker
ARTIFACT_VERSION ?= 0.8.2-4
ARTIFACT_FULLNAME ?= $(ARTIFACT_NAME)-$(ARTIFACT_VERSION).tar.gz
REPOSITORY ?= nomad-local
.PHONY: all
all: ${ARTIFACT_FULLNAME}
.PHONY: build
build: $(SOURCES)
nix-build release.nix -o build
${ARTIFACT_FULLNAME}:
nix-build release.nix $(NIX_ARGS) --no-out-link --argstr name $(ARTIFACT_FULLNAME)\
| xargs -Iresult cp -aL result $(ARTIFACT_FULLNAME)
chmod u+w $(ARTIFACT_FULLNAME)
.PHONY: clean
clean:
$(RM) $(ARTIFACT_NAME)-*.tar.*
.PHONY: publish
publish: $(ARTIFACT_FULLNAME)
jfrog-cli rt u $(ARTIFACT_FULLNAME) $(REPOSITORY)/$(ARTIFACT_NAME)/
###
.PHONY: nix-%
nix-%:
@echo "run inside nix-shell: $*"
nix-shell --pure --run "$(MAKE) $*"