Browse Source

[main] changed version string; [make] pkgrelease for easy cross-building

main 2.1.1
Unbewohnte 3 years ago
parent
commit
502877c515
  1. 29
      Makefile
  2. 2
      src/main.go

29
Makefile

@ -3,14 +3,35 @@
SRC_DIR := src/ SRC_DIR := src/
EXE_NAME := ftu EXE_NAME := ftu
INSTALLATION_DIR := /usr/local/bin/ INSTALLATION_DIR := /usr/local/bin/
RELEASE_DIR := release
LICENSE_FILE := COPYING
INSTALLATION_SCRIPT := install.sh
all: all:
cd $(SRC_DIR) && go build && mv $(EXE_NAME) .. cd $(SRC_DIR) && go build && mv $(EXE_NAME) ..
cross: pkgrelease:
cd $(SRC_DIR) && CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ftu_linux_amd64 && mv ftu_linux_amd64 .. rm -rf $(RELEASE_DIR)
cd $(SRC_DIR) && CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -o ftu_darwin_amd64 && mv ftu_darwin_amd64 ..
cd $(SRC_DIR) && CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -o ftu_windows_amd64.exe && mv ftu_windows_amd64.exe .. mkdir $(RELEASE_DIR)
mkdir $(RELEASE_DIR)/linux_amd64
mkdir $(RELEASE_DIR)/darwin_amd64
mkdir $(RELEASE_DIR)/windows_amd64
cd $(SRC_DIR) && CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ftu_linux_amd64 && mv ftu_linux_amd64 ../$(RELEASE_DIR)/linux_amd64
cd $(SRC_DIR) && CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -o ftu_darwin_amd64 && mv ftu_darwin_amd64 ../$(RELEASE_DIR)/darwin_amd64
cd $(SRC_DIR) && CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -o ftu_windows_amd64.exe && mv ftu_windows_amd64.exe ../$(RELEASE_DIR)/windows_amd64
cp $(LICENSE_FILE) $(RELEASE_DIR)/linux_amd64
cp $(INSTALLATION_SCRIPT) $(RELEASE_DIR)/linux_amd64
cp $(LICENSE_FILE) $(RELEASE_DIR)/darwin_amd64
cp $(LICENSE_FILE) $(RELEASE_DIR)/windows_amd64
cd $(RELEASE_DIR) && zip -r linux_amd64 linux_amd64/
cd $(RELEASE_DIR) && zip -r darwin_amd64 darwin_amd64/
cd $(RELEASE_DIR) && zip -r windows_amd64 windows_amd64/
race: race:
cd $(SRC_DIR) && go build -race && mv $(EXE_NAME) .. cd $(SRC_DIR) && go build -race && mv $(EXE_NAME) ..

2
src/main.go

@ -30,7 +30,7 @@ import (
) )
var ( var (
VERSION string = "v2.1.0" VERSION string = "v2.1.1"
versionInformation string = fmt.Sprintf("ftu %s\n\nCopyright (C) 2021 Kasyanov Nikolay Alexeevich (Unbewohnte (https://unbewohnte.xyz/))\nThis program comes with ABSOLUTELY NO WARRANTY.\nThis is free software, and you are welcome to redistribute it under certain conditions; type \"ftu -l\" for details.\n", VERSION) versionInformation string = fmt.Sprintf("ftu %s\n\nCopyright (C) 2021 Kasyanov Nikolay Alexeevich (Unbewohnte (https://unbewohnte.xyz/))\nThis program comes with ABSOLUTELY NO WARRANTY.\nThis is free software, and you are welcome to redistribute it under certain conditions; type \"ftu -l\" for details.\n", VERSION)

Loading…
Cancel
Save