summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2022-08-04 22:15:57 +0700
committerShulhan <ms@kilabit.info>2022-08-05 20:52:47 +0700
commitbccb6115fd7f6fe06be29250c80db5c611920711 (patch)
tree46ad1e3982685f1b1087e0efe221713c1cd44985
parent93ee0a047861c8afa582c719f2a4be1932e2e1ba (diff)
downloadpakakeh.go-bccb6115fd7f6fe06be29250c80db5c611920711.tar.xz
all: simplify and remove unused tasks in Makefile
-rw-r--r--.SRCINFO2
-rw-r--r--Makefile22
-rw-r--r--PKGBUILD11
3 files changed, 12 insertions, 23 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 38870a37..de646e22 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = share-tools
pkgdesc = Miscellaneous CLI tools: epoch, ini, xtrk
- pkgver = 0.39.0.r30.gcf3761a
+ pkgver = 0.39.0.r42.g1060faa
pkgrel = 1
url = https://github.com/shuLhan/share
arch = x86_64
diff --git a/Makefile b/Makefile
index af16444e..65acc032 100644
--- a/Makefile
+++ b/Makefile
@@ -10,8 +10,9 @@ MEM_PROF:=mem.prof
CIIGO := ${GOBIN}/ciigo
VERSION := $(shell git describe --tags)
-.PHONY: all install lint build docs docs-serve clean distclean
-.PHONY: test test.prof bench.lib.websocket coverbrowse
+.PHONY: all install build docs docs-serve clean distclean
+.PHONY: lint test test.prof
+.PHONY: aur-release
all: test lint build
@@ -19,11 +20,9 @@ install:
go install ./cmd/...
build: BUILD_FLAGS=-ldflags "-s -w -X 'github.com/shuLhan/share.Version=$(VERSION)'"
-build: GOOS=linux
-build: GOARCH=amd64
build:
- mkdir -p _bin/linux-amd64
- go build $(BUILD_FLAGS) -o _bin/linux-amd64/ ./cmd/...
+ mkdir -p _bin/
+ go build $(BUILD_FLAGS) -o _bin/ ./cmd/...
test:
CGO_ENABLED=1 go test -failfast -race -count=1 -coverprofile=$(COVER_OUT) ./...
@@ -32,17 +31,6 @@ test:
test.prof:
go test -race -cpuprofile $(CPU_PROF) -memprofile $(MEM_PROF) ./...
-bench.lib.websocket:
- export GORACE=history_size=7 && \
- export CGO_ENABLED=1 && \
- go test -race -run=none -bench -benchmem \
- -cpuprofile=$(CPU_PROF) \
- -memprofile=$(MEM_PROF) \
- . ./lib/websocket
-
-coverbrowse:
- xdg-open $(COVER_HTML)
-
lint:
-golangci-lint run ./...
diff --git a/PKGBUILD b/PKGBUILD
index 235e8d5f..613bc997 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: shulhan <ms@kilabit.info>
pkgname=share-tools
-pkgver=0.39.0.r30.gcf3761a
+pkgver=0.39.0.r42.g1060faa
pkgrel=1
pkgdesc="Miscellaneous CLI tools: epoch, ini, xtrk"
@@ -18,6 +18,7 @@ provides=('share-tools')
source=(
"$pkgname::git+https://github.com/shuLhan/share.git"
+ #"$pkgname::git+file:///home/ms/go/src/github.com/shuLhan/share"
)
md5sums=(
'SKIP'
@@ -39,8 +40,8 @@ build() {
package() {
cd "${pkgname}"
- install -Dm755 _bin/linux-amd64/epoch $pkgdir/usr/bin/epoch
- install -Dm755 _bin/linux-amd64/ini $pkgdir/usr/bin/ini
- install -Dm755 _bin/linux-amd64/xtrk $pkgdir/usr/bin/xtrk
- install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ install -Dm755 _bin/epoch $pkgdir/usr/bin/epoch
+ install -Dm755 _bin/ini $pkgdir/usr/bin/ini
+ install -Dm755 _bin/xtrk $pkgdir/usr/bin/xtrk
+ install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}