5
5
TEST_MODULES = actions cmd components config constants file helper plugin-loader rdbms table-definition transform
6
6
HP_VERSION: =$(shell git describe --tags --abbrev=0 | tr -d '[:space:]')
7
7
ORA_VERSION =19.14
8
+ BUILD_DATE =$(shell date +% F) # use +%FT%H:%M%z for format '2020-10-08T17:55+0100'
8
9
OSARCH=$(shell uname | tr "[:upper:]" "[:lower:]")
9
10
GOARCH =amd64
10
- BUILD_DATE =$(shell date +% F) # use +%FT%H:%M%z for format '2020-10-08T17:55+0100'
11
11
LD_FLAGS: =-X github.com/relloyd/halfpipe/cmd.version=${HP_VERSION} -X github.com/relloyd/halfpipe/cmd.buildDate=${BUILD_DATE} -X github.com/relloyd/halfpipe/cmd.osArch=${OSARCH}
12
12
LD_FLAGS_VERBOSE: ="-v"
13
13
LD_FLAGS_DEV: =-ldflags "${LD_FLAGS}"
@@ -115,12 +115,12 @@ build-linux: check-ora-vars
115
115
CGO_ENABLED=1 GOOS=$(OSARCH ) GOARCH=$(GOARCH ) go build -v -trimpath $(LD_FLAGS_RELEASE ) -buildmode=plugin -o dist/hp-odbc-plugin.so rdbms/odbc/main.go
116
116
117
117
# ##############################################################################
118
- # BUILD & INSTALL
118
+ # BUILD & INSTALL NATIVE BINARIES
119
119
# ##############################################################################
120
120
121
121
.PHONY : install
122
122
install : build
123
- cp -p dist/hp ~ /go /bin/
123
+ cp -p dist/hp $$ GOPATH /bin/
124
124
125
125
.PHONY : install-so
126
126
install-so : build build-so
@@ -135,29 +135,41 @@ install-so: build build-so
135
135
docker-build :
136
136
scripts/docker-build.sh $(ORA_VERSION ) $(HP_VERSION ) relloyd/halfpipe-oracle-$(ORA_VERSION )
137
137
138
- .PHONY : docker-get-files
139
- docker-get-files :
140
- $(eval RELEASE_DIR=dist/hp-linux-amd64-$(HP_VERSION ) -oracle-$(ORA_VERSION ) )
141
- mkdir -p $(RELEASE_DIR )
142
- $(eval id=$(shell docker create relloyd/halfpipe-oracle-$(ORA_VERSION ) ) :$(HP_VERSION ) ) )
143
- docker cp $(id ) :/usr/local/bin/hp $(RELEASE_DIR )
144
- docker cp $(id ) :/usr/local/lib/hp-odbc-plugin.so $(RELEASE_DIR )
145
- docker cp $(id ) :/usr/local/lib/hp-oracle-plugin.so $(RELEASE_DIR )
146
- docker rm -v $(id )
138
+ .PHONY : docker-run
139
+ docker-run :
140
+ mkdir -p $$ HOME/.halfpipe && \
141
+ docker run -ti --rm \
142
+ -v $$ HOME/.halfpipe:/home/dataops/.halfpipe \
143
+ relloyd/halfpipe-oracle-$(ORA_VERSION ) :latest
147
144
148
145
# ##############################################################################
149
146
# QUICKSTART
147
+ #
148
+ # 1. Build the core halfpipe docker image with additional tools like
149
+ # AWS CLI, kubectl, k9s, less and other CLI hacks.
150
+ # 2. Start the image with .aws and .halfpipe directories mounted
151
+ # and AWS_PROFILE=halfpipe
152
+ #
150
153
# ##############################################################################
151
154
152
155
.PHONY : quickstart
153
- quickstart :
154
- $(MAKE ) docker-build
155
- scripts/start-halfpipe.sh relloyd/halfpipe-oracle-$(ORA_VERSION )
156
+ quickstart : docker-build
157
+ scripts/start-halfpipe.sh relloyd/halfpipe-oracle-$(ORA_VERSION ) :latest
156
158
157
159
# ##############################################################################
158
160
# RELEASES
159
161
# ##############################################################################
160
162
163
+ .PHONY : docker-get-files
164
+ docker-get-files :
165
+ $(eval RELEASE_DIR=dist/hp-linux-amd64-$(HP_VERSION ) -oracle-$(ORA_VERSION ) )
166
+ mkdir -p $(RELEASE_DIR )
167
+ $(eval id=$(shell docker create relloyd/halfpipe-oracle-$(ORA_VERSION ) ) :$(HP_VERSION ) ) )
168
+ docker cp $(id ) :/usr/local/bin/hp $(RELEASE_DIR )
169
+ docker cp $(id ) :/usr/local/lib/hp-odbc-plugin.so $(RELEASE_DIR )
170
+ docker cp $(id ) :/usr/local/lib/hp-oracle-plugin.so $(RELEASE_DIR )
171
+ docker rm -v $(id )
172
+
161
173
.PHONY : release
162
174
release : release-darwin release-linux
163
175
@echo Release complete
0 commit comments