forked from Normation/rudder-plugin-datasources
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
28 lines (21 loc) · 978 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
RUDDER_BRANCH = $(shell sed -ne '/^rudder-branch=/s/rudder-branch=//p' build.conf)
PLUGIN_BRANCH = $(shell sed -ne '/^plugin-branch=/s/plugin-branch=//p' build.conf)
VERSION = $(RUDDER_BRANCH)-$(PLUGIN_BRANCH)
all: package-$(VERSION).rpkg
package-$(VERSION).rpkg: target/metadata files.txz scripts.txz
ar r package-$(VERSION).rpkg target/metadata files.txz scripts.txz
target/metadata:
mvn -Dcommit-id=$$(git rev-parse HEAD 2>/dev/null || true) properties:read-project-properties resources:copy-resources@copy-metadata
files.txz: target/datasources.jar
mkdir datasources
mv target/datasources.jar datasources/
cp ./src/main/resources/datasource-schema.sql datasources/
tar cJ -f files.txz datasources
target/datasources.jar:
mvn -U package
mv target/datasources-*-plugin-with-own-dependencies.jar target/datasources.jar
scripts.txz:
tar cJ -C packaging -f scripts.txz postinst
clean:
rm -f scripts.txz files.txz package-version.rpkg
rm -rf target datasources