Skip to content
Snippets Groups Projects
Commit fd05ca49 authored by Florent Gluck's avatar Florent Gluck
Browse files

Ongoing work: splitting up nexus-server and clients build mechanism into separate makefiles

parent 27c79e5b
Branches
No related tags found
No related merge requests found
CURRENT_DATE=$(shell eval "date -u +'%Y-%m-%d at %H:%M:%S'")
GIT_COMMIT=$(shell eval "git rev-parse HEAD")
BUILD_FLAGS=-ldflags="-X 'gitedu.hesge.ch/flg_projects/nexus_vdi/nexus/server/buildversion.buildDate=$(CURRENT_DATE)' -X 'gitedu.hesge.ch/flg_projects/nexus_vdi/nexus/server/buildversion.gitCommit=$(GIT_COMMIT)'"
BUILD_DIR=build
SERVER_BINARY=nexus-server
help:
@echo "Available targets:"
@echo " build Build nexus-server binaries"
@echo " clean Delete nexus-server binaries"
$(BUILD_DIR):
@mkdir -p $@
@echo "[Building nexus-server]"
@go build $(BUILD_FLAGS) -o $(BUILD_DIR)/$(SERVER_BINARY)
@echo "OK"
clean:
@/bin/rm -rf $(BUILD_DIR)
@echo "OK"
.PHONY: clean
package buildversion
var (
// These variables are replaced by ldflags at build time
gitCommit = "n/a"
buildDate = "n/a"
)
func GitCommit() string {
return gitCommit
}
func BuildDate() string {
return buildDate
}
...@@ -7,11 +7,9 @@ import ( ...@@ -7,11 +7,9 @@ import (
"strings" "strings"
"sync" "sync"
"gitedu.hesge.ch/flg_projects/nexus_vdi/nexus/server/buildversion"
"gitedu.hesge.ch/flg_projects/nexus_vdi/nexus/server/logger" "gitedu.hesge.ch/flg_projects/nexus_vdi/nexus/server/logger"
"gitedu.hesge.ch/flg_projects/nexus_vdi/nexus/server/version" "gitedu.hesge.ch/flg_projects/nexus_vdi/nexus/server/version"
"gitedu.hesge.ch/flg_projects/nexus_vdi/nexus/common/buildversion"
"github.com/sirupsen/logrus" "github.com/sirupsen/logrus"
"gopkg.in/ini.v1" "gopkg.in/ini.v1"
) )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment