Улучшена сборка проекта.
All checks were successful
drawio-export/pipeline/head This commit looks good
drawio-export/pipeline/tag This commit looks good

This commit is contained in:
Алексей Бадяев 2023-04-13 19:02:27 +07:00
parent 50c7579cf5
commit f50480979b
Signed by: alexey
GPG Key ID: 686FBC1363E4AFAE
4 changed files with 14 additions and 4 deletions

View File

@ -5,6 +5,7 @@
"версионируется",
"Alek",
"Aleksei",
"appname",
"Badiaev",
"Childs",
"choco",

View File

@ -112,7 +112,8 @@ pipeline {
environment {
OUTDIR = 'dist'
DIST_TAG = 'empty'
GO_OPT = '-ldflags "-w"'
GO_LDFLAGS = '-w'
GO_OPT = ' '
}
steps {
echo "***** RELEASE ${PROJECT_NAME} for Linux *****"
@ -140,6 +141,7 @@ pipeline {
environment {
OUTDIR = 'dist'
DIST_TAG = 'empty'
GO_LDFLAGS = '-w'
GO_OPT = ' '
}
steps {

View File

@ -8,7 +8,10 @@ import (
"git.mousesoft.ru/ms/drawio-exporter/pkg/drawio"
)
var version string // Версия приложения
var (
appname string // Наименование приложения
version string // Версия приложения
)
func main() {
flag.Parse()
@ -17,7 +20,7 @@ func main() {
os.Exit(0)
}
if flagVersion {
fmt.Println("Draw.io Export cli util", version)
fmt.Println(appname, version)
os.Exit(0)
}
if flag.NArg() < 1 {

View File

@ -2,6 +2,7 @@
# ========================
PROJECT_ID := drawio-export
PROJECT_NAME ?= MouseSoft DrawIO Export
BIN_SUFFIX :=
TMPDIR ?= $(CURDIR)/tmp
@ -13,7 +14,10 @@ VERSION ?= $(strip $(shell ./scripts/version.sh))
VERSION_NUMBER := $(strip $(shell ./scripts/version.sh number))
DIST_KIND := $(shell uname -m)
GO_OPT_BASE := -mod vendor -ldflags "-X main.version=${VERSION}"
GO_LDFLAGS ?=
GO_OPT_V := -X "main.version=$(VERSION)"
GO_OPT_APP := -X "main.appname=$(PROJECT_NAME)"
GO_OPT_BASE := -mod vendor -ldflags '$(GO_OPT_V) $(GO_OPT_APP) $(GO_LDFLAGS)'
GO_OPT ?=
EXPORT_RESULT ?= false # for CI please set EXPORT_RESULT to true
COVERAGE_FORMAT ?= html