Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile21
-rw-r--r--VERSION1
-rw-r--r--main.go6
3 files changed, 28 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 00000000..e356ef5c
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,21 @@
+REVISION := $(shell git rev-parse --short HEAD || echo unknown)
+LAST_TAG := $(shell git describe --tags --abbrev=0)
+COMMITS := $(shell echo `git log --oneline $(LAST_TAG)..HEAD | wc -l`)
+VERSION := $(shell cat VERSION)
+
+ifneq ($(VERSION),$(LAST_TAG))
+ VERSION := $(shell echo $(VERSION)~beta.$(COMMITS).g$(REVISION))
+endif
+
+GO_LDFLAGS ?= -X main.VERSION=$(VERSION) -X main.REVISION=$(REVISION)
+GO_FILES ?= $(shell find . -name '*.go')
+
+export GO15VENDOREXPERIMENT := 1
+
+all: gitlab-pages
+
+gitlab-pages: $(GO_FILES)
+ go build -o gitlab-pages --ldflags="$(GO_LDFLAGS)"
+
+update:
+ godep save ./...
diff --git a/VERSION b/VERSION
new file mode 100644
index 00000000..6e8bf73a
--- /dev/null
+++ b/VERSION
@@ -0,0 +1 @@
+0.1.0
diff --git a/main.go b/main.go
index 5e5c6a90..2f49f65d 100644
--- a/main.go
+++ b/main.go
@@ -10,6 +10,9 @@ import (
"sync"
)
+var VERSION = "dev"
+var REVISION = "HEAD"
+
var listenHTTP = flag.String("listen-http", ":80", "The address to listen for HTTP requests")
var listenHTTPS = flag.String("listen-https", "", "The address to listen for HTTPS requests")
var pagesDomain = flag.String("pages-domain", "gitlab-example.com", "The domain to serve static pages")
@@ -73,6 +76,9 @@ func main() {
var wg sync.WaitGroup
var app theApp
+ fmt.Println("GitLab Pages Daemon %s (%s)", VERSION, REVISION)
+ fmt.Println("URL: https://gitlab.com/gitlab-org/gitlab-pages")
+
flag.Parse()
// Listen for HTTP