Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-workhorse
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-workhorse
Commits
4a3a83cf
Commit
4a3a83cf
authored
Jul 29, 2015
by
Jacob Vosmaer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Makefile
parent
0382528d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
0 deletions
+12
-0
.gitignore
.gitignore
+1
-0
Makefile
Makefile
+5
-0
main.go
main.go
+6
-0
No files found.
.gitignore
0 → 100644
View file @
4a3a83cf
gitlab-git-http-server
Makefile
0 → 100644
View file @
4a3a83cf
PREFIX
=
/usr/local
VERSION
=
$(
shell
git describe
)
-
$(
shell
date
-u
+%Y%m%d.%H%M%S
)
gitlab-git-http-server
:
main.go
go build
-ldflags
"-X main.Version
${VERSION}
"
-o
gitlab-git-http-server main.go
main.go
View file @
4a3a83cf
...
...
@@ -38,11 +38,13 @@ type gitEnv struct {
GL_ID
string
}
var
Version
string
var
httpClient
=
&
http
.
Client
{}
var
pathTraversal
=
regexp
.
MustCompile
(
`/../`
)
// Command-line options
var
repoRoot
string
var
printVersion
=
flag
.
Bool
(
"version"
,
false
,
"Print version and exit"
)
var
listenAddr
=
flag
.
String
(
"listenAddr"
,
"localhost:8181"
,
"Listen address for HTTP server"
)
var
authBackend
=
flag
.
String
(
"authBackend"
,
"http://localhost:8080"
,
"Authentication/authorization backend"
)
...
...
@@ -60,6 +62,10 @@ func main() {
flag
.
PrintDefaults
()
}
flag
.
Parse
()
if
*
printVersion
{
fmt
.
Printf
(
"gitlab-git-http-server %s
\n
"
,
Version
)
os
.
Exit
(
0
)
}
repoRoot
=
flag
.
Arg
(
0
)
if
repoRoot
==
""
{
flag
.
Usage
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment