Skip to content
This repository was archived by the owner on May 24, 2024. It is now read-only.

Commit 459ac79

Browse files
authored
Merge pull request #16 from LF-Engineering/DA-5001
Enhance logging and caching
2 parents d6468e5 + ea6b682 commit 459ac79

File tree

6 files changed

+146
-126
lines changed

6 files changed

+146
-126
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ vendor/
2424
out
2525
xxx
2626
yyy
27-
27+
.idea
2828
# golang output binary directory
2929
bin
3030

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,13 @@ GO_VET=go vet
1010
GO_IMPORTS=goimports -w
1111
GO_ERRCHECK=errcheck -asserts -ignore '[FS]?[Pp]rint*'
1212
BINARIES=confluence
13+
COMMIT=`git rev-parse --short HEAD`
14+
VERSION=`git describe --tags --always | cut -d- -f1`
15+
LDFLAGS=-ldflags "-s -w -extldflags '-static' -X github.com/LF-Engineering/insights-connector-confluence/build.GitCommit=$(COMMIT) \
16+
-X github.com/LF-Engineering/insights-connector-confluence/build.Version=$(VERSION)"
1317
all: check ${BINARIES}
1418
confluence: ${GO_BIN_FILES}
15-
${GO_ENV} ${GO_BUILD} -o confluence ${GO_BIN_FILES}
19+
${GO_ENV} ${GO_BUILD} -o confluence ${LDFLAGS} ${GO_BIN_FILES}
1620

1721
fmt: ${GO_BIN_FILES}
1822
${GO_FMT} ${GO_BIN_FILES}

build/options.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package build
2+
3+
var (
4+
// Version is component version
5+
Version = "latest"
6+
// GitCommit is commit hash associated with the version
7+
GitCommit = "HEAD"
8+
AppName = "insights-connector-confluence"
9+
)

0 commit comments

Comments
 (0)