-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Makefile and Dockerfile for builds of utility tool (#15)
This change adds a Makefile and a Dockerfile for builds of the go-dicom dicomutil utility tool and for testing the package in general.
- Loading branch information
1 parent
9504516
commit f9875e4
Showing
5 changed files
with
41 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM golang:alpine | ||
WORKDIR /go/src/github.com/gradienthealth/go-dicom | ||
COPY . . | ||
RUN apk add --no-cache make git | ||
RUN go get github.com/golang/dep/cmd/dep | ||
RUN make |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
BINARY = dicomutil | ||
|
||
.PHONY: build | ||
build: | ||
dep ensure | ||
$(MAKE) test | ||
go build -o build/${BINARY} ./dicomutil | ||
|
||
.PHONY: test | ||
test: | ||
go test ./... | ||
|
||
.PHONY: run | ||
run: | ||
make build | ||
./${BINARY} | ||
|
||
.PHONY: release | ||
release: | ||
dep ensure | ||
$(MAKE) test | ||
GOOS=linux GOARCH=amd64 go build -o build/${BINARY}-linux-amd64 ./dicomutil; | ||
GOOS=darwin GOARCH=amd64 go build -o build/${BINARY}-darwin-amd64 ./dicomutil; | ||
GOOS=windows GOARCH=amd64 go build -o build/${BINARY}-windows-amd64.exe ./dicomutil; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters