@@ -19,12 +19,9 @@ pkgs = $(shell $(GO) list ./... | grep -v /vendor/)
1919PREFIX ?= $(shell pwd)
2020BIN_DIR ?= $(shell pwd)
2121BASE_DIR ?= $(shell dirname $(BIN_DIR ) )
22- MSSQL_DIR ?= $(BASE_DIR ) /mssql_exporter
23- DB2_DIR ?= $(BASE_DIR ) /db2_exporter
2422DOCKER_IMAGE_NAME ?= mssql-exporter
2523DOCKER_IMAGE_TAG ?= $(subst /,-,$(shell git rev-parse --abbrev-ref HEAD) )
2624
27-
2825all : promu build
2926
3027style :
@@ -47,53 +44,57 @@ build-mssql: promu
4744 @echo " >> building MSSQL binaries"
4845 @$(PROMU ) build --prefix $(PREFIX ) -v
4946
50- build-ora : promu
47+ build-oracledb : promu
5148 @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
5350
5451build-db2 : promu
5552 @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
5754
5855build-hana : promu
5956 @echo " >> building HANASQL binaries"
6057 @$(PROMU ) build --prefix $(PREFIX ) --config=.promu-hana.yml
6158
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)
9798
9899docker :
99100 @echo " >> building docker image"
0 commit comments