diff options
author | Tulir Asokan <tulir@maunium.net> | 2018-05-03 10:03:25 +0300 |
---|---|---|
committer | Tulir Asokan <tulir@maunium.net> | 2018-05-03 10:03:25 +0300 |
commit | 93cbdc0ca88d46454b96043d8baf4b231e91474a (patch) | |
tree | 0db78cb9e3c2e3ec85c01f61261fe7d72c83453b | |
parent | b796c2e2092f3ed41e607382a798d27e3e11b914 (diff) |
Add debian packaging and some build scripts
-rw-r--r-- | .gitignore | 5 | ||||
-rw-r--r-- | deb/DEBIAN/control | 7 | ||||
-rwxr-xr-x | scripts/build | 2 | ||||
-rwxr-xr-x | scripts/coverage | 8 | ||||
-rwxr-xr-x | scripts/lint | 2 | ||||
-rwxr-xr-x | scripts/package | 6 |
6 files changed, 29 insertions, 1 deletions
@@ -1,5 +1,8 @@ .idea/ +target/ gomuks -gomuks.exe +*.exe +*.deb coverage.out coverage.html +deb/usr diff --git a/deb/DEBIAN/control b/deb/DEBIAN/control new file mode 100644 index 0000000..0af23c6 --- /dev/null +++ b/deb/DEBIAN/control @@ -0,0 +1,7 @@ +Package: gomuks +Version: 0.0.0-1 +Section: net +Priority: optional +Architecture: amd64 +Maintainer: Tulir Asokan <tulir@maunium.net> +Description: A terminal based Matrix client written in Go. diff --git a/scripts/build b/scripts/build new file mode 100755 index 0000000..832ca13 --- /dev/null +++ b/scripts/build @@ -0,0 +1,2 @@ +#!/bin/bash +go build -o target/gomuks diff --git a/scripts/coverage b/scripts/coverage new file mode 100755 index 0000000..c52d4a6 --- /dev/null +++ b/scripts/coverage @@ -0,0 +1,8 @@ +#!/bin/bash +mkdir -p target/ +go test ./... -coverprofile=target/coverage.out +if [ ! -z $1 ]; then + go tool cover -html=coverage.out -o $1 +else + go tool cover -html=coverage.out +fi diff --git a/scripts/lint b/scripts/lint new file mode 100755 index 0000000..06957b8 --- /dev/null +++ b/scripts/lint @@ -0,0 +1,2 @@ +#!/bin/bash +golint ./... | grep -v "should have comment" | grep -v "vendor/" diff --git a/scripts/package b/scripts/package new file mode 100755 index 0000000..158439f --- /dev/null +++ b/scripts/package @@ -0,0 +1,6 @@ +#!/bin/bash +mkdir -p deb/usr/bin/ +mkdir -p target/ +go build -o deb/usr/bin/gomuks +version=$(cat deb/DEBIAN/control | grep Version | awk '{ print $2 }') +dpkg-deb --build deb target/gomuks-$version.deb |