aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore5
-rw-r--r--deb/DEBIAN/control7
-rwxr-xr-xscripts/build2
-rwxr-xr-xscripts/coverage8
-rwxr-xr-xscripts/lint2
-rwxr-xr-xscripts/package6
6 files changed, 29 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index 915ccf5..9458a59 100644
--- a/.gitignore
+++ b/.gitignore
@@ -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