-
Notifications
You must be signed in to change notification settings - Fork 111
/
Makefile
32 lines (23 loc) · 911 Bytes
/
Makefile
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
# This Makefile is used by our internal automation, its purpose is to generate
# a tarball containing all the files needed to create a container image. The
# resulting tarball is ingested in subsequent automation workflows.
product = couchbase-elasticsearch-connector
bldNum = $(if $(BLD_NUM),$(BLD_NUM),9999)
version = $(if $(VERSION),$(VERSION),1.0.0)
appDir = build/install/$(product)
artifact = $(product)-image_$(version)-$(bldNum)
dist: package-artifact
package-artifact: create-tarball
gzip -9 dist/$(artifact).tar
mv dist/$(artifact).tar.gz dist/$(artifact).tgz
create-tarball: compile
mkdir -p dist/$(product)/$(appDir)
cp Dockerfile dist/$(product)
cp -a $(appDir)/* dist/$(product)/$(appDir)
cd dist && tar -cf $(artifact).tar $(product)
rm -rf dist/$(product)
compile: clean
./gradlew clean installDist
clean:
rm -rf dist
.PHONY: clean compile create-tarball package-artifact dist