mirror of
https://github.com/anthonyaxenov/csv2md.git
synced 2024-11-26 07:04:57 +00:00
New make recipe called 'release'
This commit is contained in:
parent
5dcccb9880
commit
6996e4634f
16
Makefile
16
Makefile
@ -12,29 +12,35 @@ LINUX_FILE="${LINUX_PATH}/${BINARY_NAME}"
|
|||||||
WINDOWS_FILE="${WINDOWS_PATH}/${BINARY_NAME}.exe"
|
WINDOWS_FILE="${WINDOWS_PATH}/${BINARY_NAME}.exe"
|
||||||
DARWIN_FILE="${DARWIN_PATH}/${BINARY_NAME}"
|
DARWIN_FILE="${DARWIN_PATH}/${BINARY_NAME}"
|
||||||
|
|
||||||
## clean: Removes all compiled binaries
|
## clean: Remove all compiled binaries
|
||||||
clean:
|
clean:
|
||||||
@go clean
|
@go clean
|
||||||
@rm -rf bin/
|
@rm -rf bin/
|
||||||
|
|
||||||
## linux: Builds new binaries for linux (x64)
|
## linux: Build new binaries for linux (x64)
|
||||||
linux:
|
linux:
|
||||||
@rm -rf ${LINUX_PATH}
|
@rm -rf ${LINUX_PATH}
|
||||||
@GOARCH=${ARCH} GOOS=linux go build -o ${LINUX_FILE} . && echo "Compiled: ${LINUX_FILE}"
|
@GOARCH=${ARCH} GOOS=linux go build -o ${LINUX_FILE} . && echo "Compiled: ${LINUX_FILE}"
|
||||||
|
|
||||||
## win: Builds new binaries for windows (x64)
|
## win: Build new binaries for windows (x64)
|
||||||
win:
|
win:
|
||||||
@rm -rf ${WINDOWS_PATH}
|
@rm -rf ${WINDOWS_PATH}
|
||||||
@GOARCH=${ARCH} GOOS=windows go build -o ${WINDOWS_FILE} . && echo "Compiled: ${WINDOWS_FILE}"
|
@GOARCH=${ARCH} GOOS=windows go build -o ${WINDOWS_FILE} . && echo "Compiled: ${WINDOWS_FILE}"
|
||||||
|
|
||||||
## darwin: Builds new binaries for darwin (x64)
|
## darwin: Build new binaries for darwin (x64)
|
||||||
darwin:
|
darwin:
|
||||||
@rm -rf ${DARWIN_PATH}
|
@rm -rf ${DARWIN_PATH}
|
||||||
@GOARCH=${ARCH} GOOS=darwin go build -o ${DARWIN_FILE} . && echo "Compiled: ${DARWIN_FILE}"
|
@GOARCH=${ARCH} GOOS=darwin go build -o ${DARWIN_FILE} . && echo "Compiled: ${DARWIN_FILE}"
|
||||||
|
|
||||||
## build: Builds new binaries for linux, windows and darwin (x64)
|
## build: Build new binaries for linux, windows and darwin (x64)
|
||||||
all: clean linux win darwin
|
all: clean linux win darwin
|
||||||
|
|
||||||
|
## release: Build all binaries and zip them
|
||||||
|
release: clean darwin linux win
|
||||||
|
@zip -j ${LINUX_PATH}.zip ${LINUX_FILE}
|
||||||
|
@zip -j ${DARWIN_PATH}.zip ${DARWIN_FILE}
|
||||||
|
@zip -j ${WINDOWS_PATH}.zip ${WINDOWS_FILE}
|
||||||
|
|
||||||
## compile: This message
|
## compile: This message
|
||||||
help: Makefile
|
help: Makefile
|
||||||
@echo "Choose a command run:"
|
@echo "Choose a command run:"
|
||||||
|
Loading…
Reference in New Issue
Block a user