Skip to content

Commit

Permalink
CI: package as a deb
Browse files Browse the repository at this point in the history
  • Loading branch information
MrCyjaneK committed Sep 12, 2021
1 parent 88876b9 commit f3e213f
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .abstruse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
image: mrcyjanek/goprod:nodejs-linux

script:
- make install_dependencies
- make build_ui
- make statik
- apt install -y protobuf-compiler
- PATH="$PATH:$GOPATH/bin" make protoc
- make wire
- mkdir -p build/{bin,deb}
- GOOS=linux GOARCH=arm64 go build -o "build/bin/abstruse-worker_linux_arm64" ./cmd/abstruse-worker
- GOOS=linux GOARCH=386 go build -o "build/bin/abstruse-worker_linux_386" ./cmd/abstruse-worker
- GOOS=linux GOARCH=arm go build -o "build/bin/abstruse-worker_linux_arm" ./cmd/abstruse-worker
- GOOS=linux GOARCH=amd64 go build -o "build/bin/abstruse-worker_linux_amd64" ./cmd/abstruse-worker
- GOOS=linux GOARCH=arm64 go build -o "build/bin/abstruse-server_linux_arm64" ./cmd/abstruse-server
- GOOS=linux GOARCH=386 go build -o "build/bin/abstruse-server_linux_386" ./cmd/abstruse-server
- GOOS=linux GOARCH=arm go build -o "build/bin/abstruse-server_linux_arm" ./cmd/abstruse-server
- GOOS=linux GOARCH=amd64 go build -o "build/bin/abstruse-server_linux_amd64" ./cmd/abstruse-server
- GOOS=linux GOARCH=arm64 checkinstall --type=debian --install=no --default --pkgname=abstruse-ci --pkgversion=0.0.0+git$(git show -s --date=format:%Y%m%d%H%M --format=%cd) --arch=arm64 --pakdir=build/deb [email protected] --strip=no --stripso=no
- GOOS=linux GOARCH=386 checkinstall --type=debian --install=no --default --pkgname=abstruse-ci --pkgversion=0.0.0+git$(git show -s --date=format:%Y%m%d%H%M --format=%cd) --arch=i386 --pakdir=build/deb [email protected] --strip=no --stripso=no
- GOOS=linux GOARCH=arm checkinstall --type=debian --install=no --default --pkgname=abstruse-ci --pkgversion=0.0.0+git$(git show -s --date=format:%Y%m%d%H%M --format=%cd) --arch=armhf --pakdir=build/deb [email protected] --strip=no --stripso=no
- GOOS=linux GOARCH=amd64 checkinstall --type=debian --install=no --default --pkgname=abstruse-ci --pkgversion=0.0.0+git$(git show -s --date=format:%Y%m%d%H%M --format=%cd) --arch=amd64 --pakdir=build/deb [email protected] --strip=no --stripso=no
- mv build/deb/* /apt
- mv build/bin/* /archive
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,8 @@ test-unit:
test-e2e:
go run ./tests/e2e

install:
cp build/bin/abstruse-worker_${GOOS}_${GOARCH} /usr/bin/${BINNAME}
cp build/bin/abstruse-server_${GOOS}_${GOARCH} /usr/bin/${BINNAME}

.PHONY: build server worker build_ui statik wire install_dependencies clean dev dev_worker protoc docker docker_server docker_worker docker_push test test-unit test-e2e release

0 comments on commit f3e213f

Please sign in to comment.