A version increased to 1.1.1. And a version now is being passed from ldflags in a Makefile.

This commit is contained in:
Alexander Andreev 2022-08-17 21:49:57 +04:00
parent 59bd479ebe
commit ec10db27a5
Signed by: Arav
GPG Key ID: 0388CC8FAA51063F
4 changed files with 7 additions and 5 deletions

View File

@ -6,7 +6,7 @@ SYSDDIR_=${shell pkg-config systemd --variable=systemdsystemunitdir}
SYSDDIR=${SYSDDIR_:/%=%} SYSDDIR=${SYSDDIR_:/%=%}
DESTDIR=/ DESTDIR=/
LDFLAGS=-ldflags "-s -w" -tags osusergo,netgo LDFLAGS=-ldflags "-s -w -X main.version=1.1.1" -tags osusergo,netgo
all: ${TARGET} all: ${TARGET}

View File

@ -1,5 +1,5 @@
justcaptcha ver. 1.1 justcaptcha ver. 1.1.1
==================== ======================
A simple CAPTCHA service implementation. A simple CAPTCHA service implementation.

View File

@ -1,6 +1,6 @@
# Maintainer: Alexander "Arav" Andreev <me@arav.top> # Maintainer: Alexander "Arav" Andreev <me@arav.top>
pkgname=justcaptcha-git pkgname=justcaptcha-git
pkgver=1.1 pkgver=1.1.1
pkgrel=1 pkgrel=1
pkgdesc="Just a CAPTCHA service" pkgdesc="Just a CAPTCHA service"
arch=('i686' 'x86_64' 'arm' 'armv6h' 'armv7h' 'aarch64') arch=('i686' 'x86_64' 'arm' 'armv6h' 'armv7h' 'aarch64')

View File

@ -15,6 +15,8 @@ import (
"time" "time"
) )
var version string
var listenAddress *string = flag.String("listen", "/var/run/justcaptcha/c.sock", "listen address (ip:port|unix_path)") var listenAddress *string = flag.String("listen", "/var/run/justcaptcha/c.sock", "listen address (ip:port|unix_path)")
var captchaExpiry *time.Duration = flag.Duration("expiry", 5*time.Minute, "CAPTCHA expiry in format XX{s,m,h}, e.g. 5m, 300s") var captchaExpiry *time.Duration = flag.Duration("expiry", 5*time.Minute, "CAPTCHA expiry in format XX{s,m,h}, e.g. 5m, 300s")
var showVersion *bool = flag.Bool("v", false, "show version") var showVersion *bool = flag.Bool("v", false, "show version")
@ -24,7 +26,7 @@ func main() {
log.SetFlags(0) log.SetFlags(0)
if *showVersion { if *showVersion {
fmt.Println("justcaptchad ver. 1.0\nCopyright (c) 2022 Alexander \"Arav\" Andreev <me@arav.top>") fmt.Println("justcaptchad ver.", version, "\nCopyright (c) 2022 Alexander \"Arav\" Andreev <me@arav.top>")
return return
} }