Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
12f2ca92
Commit
12f2ca92
authored
Jan 28, 2015
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated build file
parent
5631d52f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
12 deletions
+30
-12
build.go
+30
-12
No files found.
build.go
View file @
12f2ca92
...
...
@@ -11,6 +11,7 @@ import (
"log"
"os"
"os/exec"
"path"
"path/filepath"
"regexp"
"runtime"
...
...
@@ -20,12 +21,12 @@ import (
)
var
(
versionRe
=
regexp
.
MustCompile
(
`-[0-9]{1,3}-g[0-9a-f]{5,10}`
)
goarch
string
goos
string
noupgrade
bool
version
string
=
"2.0.0-alpha"
race
bool
versionRe
=
regexp
.
MustCompile
(
`-[0-9]{1,3}-g[0-9a-f]{5,10}`
)
goarch
string
goos
string
version
string
=
"2.0.0-alpha"
race
bool
workingDir
string
)
const
minGoVersion
=
1.3
...
...
@@ -56,6 +57,8 @@ func main() {
return
}
workingDir
,
_
=
os
.
Getwd
()
for
_
,
cmd
:=
range
flag
.
Args
()
{
switch
cmd
{
case
"setup"
:
...
...
@@ -64,17 +67,19 @@ func main() {
case
"build"
:
pkg
:=
"."
var
tags
[]
string
if
noupgrade
{
tags
=
[]
string
{
"noupgrade"
}
}
build
(
pkg
,
tags
)
case
"test"
:
pkg
:=
"./..."
test
(
pkg
)
test
(
"./pkg/..."
)
case
"package"
:
test
(
"./pkg/..."
)
build
(
"."
,
[]
string
{})
case
"build-ui"
:
buildFrontend
()
case
"clean"
:
clean
()
default
:
log
.
Fatalf
(
"Unknown command %q"
,
cmd
)
...
...
@@ -82,6 +87,19 @@ func main() {
}
}
func
ChangeWorkingDir
(
dir
string
)
{
os
.
Chdir
(
dir
)
}
func
buildFrontend
()
{
ChangeWorkingDir
(
path
.
Join
(
workingDir
,
"grafana"
))
defer
func
()
{
ChangeWorkingDir
(
path
.
Join
(
workingDir
,
"../"
))
}()
runPrint
(
"grunt"
)
}
func
setup
()
{
runPrint
(
"go"
,
"get"
,
"-v"
,
"github.com/tools/godep"
)
runPrint
(
"go"
,
"get"
,
"-v"
,
"github.com/mattn/go-sqlite3"
)
...
...
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