feat: YAB-1785: Initial commit
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
BINARY_NAME=keyboard-reader
|
||||
LD_FLAGS="-s -w -buildid="$(shell git rev-parse HEAD)
|
||||
|
||||
build:
|
||||
#GOARCH=amd64 GOOS=linux go build -o ${BINARY_NAME} -trimpath -ldflags ${LD_FLAGS} -tags netgo
|
||||
go build -o ${BINARY_NAME} -ldflags ${LD_FLAGS} -tags netgo
|
||||
|
||||
run: build
|
||||
./${BINARY_NAME} --list
|
||||
|
||||
clean:
|
||||
go clean
|
||||
rm ./debian/opt/ocppc/bin/${BINARY_NAME} || true
|
||||
rm -rf ./build || true
|
||||
docker container rm ${BINARY_NAME} || true
|
||||
docker image rm ${BINARY_NAME} || true
|
||||
|
||||
deb: clean build
|
||||
cp ${BINARY_NAME} ./debian/opt/ocppc/bin/
|
||||
cd ./debian && dpkg-buildpackage -rfakeroot --no-sign --target-arch amd64 --host-arch amd64
|
||||
|
||||
docker-deb: clean
|
||||
docker build -t ${BINARY_NAME} .
|
||||
docker container run --name ${BINARY_NAME} ${BINARY_NAME}
|
||||
docker container cp ${BINARY_NAME}:/data ./build
|
||||
Reference in New Issue
Block a user