@@ -19,12 +19,9 @@ pkgs = $(shell $(GO) list ./... | grep -v /vendor/)
19
19
PREFIX ?= $(shell pwd)
20
20
BIN_DIR ?= $(shell pwd)
21
21
BASE_DIR ?= $(shell dirname $(BIN_DIR ) )
22
- MSSQL_DIR ?= $(BASE_DIR ) /mssql_exporter
23
- DB2_DIR ?= $(BASE_DIR ) /db2_exporter
24
22
DOCKER_IMAGE_NAME ?= mssql-exporter
25
23
DOCKER_IMAGE_TAG ?= $(subst /,-,$(shell git rev-parse --abbrev-ref HEAD) )
26
24
27
-
28
25
all : promu build
29
26
30
27
style :
@@ -47,53 +44,57 @@ build-mssql: promu
47
44
@echo " >> building MSSQL binaries"
48
45
@$(PROMU ) build --prefix $(PREFIX ) -v
49
46
50
- build-ora : promu
47
+ build-oracledb : promu
51
48
@echo " >> building ORACLE binaries"
52
- @$(PROMU ) build --prefix $(PREFIX ) --config=.promu-oracle.yml
49
+ @. $( PREFIX ) /.env_oracle && $(PROMU ) build --prefix $(PREFIX ) --config=.promu-oracle.yml
53
50
54
51
build-db2 : promu
55
52
@echo " >> building DB2 binaries"
56
- @$(PROMU ) build --prefix $(PREFIX ) --config=.promu-db2.yml
53
+ @. $( PREFIX ) /.env_db2 && $(PROMU ) build --prefix $(PREFIX ) --config=.promu-db2.yml
57
54
58
55
build-hana : promu
59
56
@echo " >> building HANASQL binaries"
60
57
@$(PROMU ) build --prefix $(PREFIX ) --config=.promu-hana.yml
61
58
62
- build : build-mssql build-db2 build-hana # build-ora
63
-
64
- tarball-mssql : mssql_exporter
65
- @echo " >> building mssql release tarball"
66
- @mv $(BIN_DIR ) /contribs/mssql_exporter $(BIN_DIR ) /config
67
- @git remote set-url origin " https://github.com/peekjef72/mssql_exporter.git"
68
- @$(PROMU ) tarball --config=.promu.yml
69
- @git remote set-url origin " https://github.com/peekjef72/sql_exporter.git"
70
- @mv $(BIN_DIR ) /config $(BIN_DIR ) /contribs/mssql_exporter
71
-
72
- tarball-db2 : build-db2
73
- @echo " >> building db2 release tarball"
74
- @mv $(BIN_DIR ) /contribs/db2_exporter $(BIN_DIR ) /config
75
- @git remote set-url origin " https://github.com/peekjef72/db2_exporter.git"
76
- @$(PROMU ) tarball --config=.promu-db2.yml
77
- @git remote set-url origin " https://github.com/peekjef72/sql_exporter.git"
78
- @mv $(BIN_DIR ) /config $(BIN_DIR ) /contribs/db2_exporter
79
-
80
- tarball-ora : build-ora
81
- @echo " >> building oracledb release tarball"
82
- @mv $(BIN_DIR ) /contribs/oracledb_exporter $(BIN_DIR ) /config
83
- @git remote set-url origin " https://github.com/peekjef72/oracledb_exporter.git"
84
- @$(PROMU ) tarball --config=.promu-oracle.yml
85
- @git remote set-url origin " https://github.com/peekjef72/sql_exporter.git"
86
- @mv $(BIN_DIR ) /config $(BIN_DIR ) /contribs/oracledb_exporter
87
-
88
- tarball-hana : build-hana
89
- @echo " >> building HANASQL release tarball"
90
- @mv $(BIN_DIR ) /contribs/hanasql_exporter $(BIN_DIR ) /config
91
- @git remote set-url origin " https://github.com/peekjef72/hanasql_exporter.git"
92
- @$(PROMU ) tarball --config=.promu-hana.yml
93
- @git remote set-url origin " https://github.com/peekjef72/sql_exporter.git"
94
- @mv $(BIN_DIR ) /config $(BIN_DIR ) /contribs/hanasql_exporter
95
-
96
- tarball : tarball-mssql tarball-db2 tarball-hana # tarball-ora
59
+ build : build-mssql build-db2 build-hana # build-oracle
60
+
61
+ # tarball-mssql: mssql_exporter
62
+ # @echo ">> building mssql release tarball"
63
+ # @mv $(BIN_DIR)/contribs/mssql_exporter $(BIN_DIR)/config
64
+ # @git remote set-url origin "https://github.com/peekjef72/mssql_exporter.git"
65
+ # @$(PROMU) tarball --config=.promu.yml
66
+ # @git remote set-url origin "https://github.com/peekjef72/sql_exporter.git"
67
+ # @mv $(BIN_DIR)/config $(BIN_DIR)/contribs/mssql_exporter
68
+
69
+ # tarball-db2: build-db2
70
+ # @echo ">> building db2 release tarball"
71
+ # @mv $(BIN_DIR)/contribs/db2_exporter $(BIN_DIR)/config
72
+ # @git remote set-url origin "https://github.com/peekjef72/db2_exporter.git"
73
+ # @$(PROMU) tarball --config=.promu-db2.yml
74
+ # @git remote set-url origin "https://github.com/peekjef72/sql_exporter.git"
75
+ # @mv $(BIN_DIR)/config $(BIN_DIR)/contribs/db2_exporter
76
+
77
+ # tarball-oracle:
78
+ # @echo ">> building oracledb release tarball"
79
+ # @mv $(BIN_DIR)/contribs/oracle_exporter $(BIN_DIR)/config
80
+ # @git remote set-url origin "https://github.com/peekjef72/oracledb_exporter.git"
81
+ # @$(PROMU) tarball --config=.promu-oracle.yml
82
+ # @git remote set-url origin "https://github.com/peekjef72/sql_exporter.git"
83
+ # @mv $(BIN_DIR)/config $(BIN_DIR)/contribs/oracledb_exporter
84
+
85
+ # tarball-hana: build-hana
86
+ # @echo ">> building HANASQL release tarball"
87
+ # @mv $(BIN_DIR)/contribs/hanasql_exporter $(BIN_DIR)/config
88
+ # @git remote set-url origin "https://github.com/peekjef72/hanasql_exporter.git"
89
+ # @$(PROMU) tarball --config=.promu-hana.yml
90
+ # @git remote set-url origin "https://github.com/peekjef72/sql_exporter.git"
91
+ # @mv $(BIN_DIR)/config $(BIN_DIR)/contribs/hanasql_exporter
92
+
93
+ # tarball: tarball-mssql tarball-db2 tarball-hana #tarball-oracle
94
+
95
+ tarball :
96
+ @echo " >> build release tarball"
97
+ @$(shell ./build_tarball.sh)
97
98
98
99
docker :
99
100
@echo " >> building docker image"
0 commit comments