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--main.go16
1 files changed, 10 insertions, 6 deletions
diff --git a/main.go b/main.go
index 0c6d4ee9..ba7a25db 100644
--- a/main.go
+++ b/main.go
@@ -30,15 +30,11 @@ func appMain() {
flag.Parse()
- version := VERSION + "-" + REVISION
- if *showVersion {
- log.SetFlags(0)
- log.Printf(version)
- os.Exit(0)
- }
+ printVersion(*showVersion, VERSION)
log.Printf("GitLab Pages Daemon %s (%s)", VERSION, REVISION)
log.Printf("URL: https://gitlab.com/gitlab-org/gitlab-pages\n")
+
err := os.Chdir(*pagesRoot)
if err != nil {
log.Fatalln(err)
@@ -83,6 +79,14 @@ func appMain() {
runApp(config)
}
+func printVersion(showVersion bool, version string) {
+ if showVersion {
+ log.SetFlags(0)
+ log.Printf(version)
+ os.Exit(0)
+ }
+}
+
func main() {
log.SetOutput(os.Stderr)