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
7aaa1884
Commit
7aaa1884
authored
Apr 24, 2018
by
Mario Trangoni
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
build.go: fix deadcode issues
parent
44a61a6d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
26 deletions
+3
-26
build.go
+3
-26
No files found.
build.go
View file @
7aaa1884
...
...
@@ -16,7 +16,6 @@ import (
"os/exec"
"path"
"path/filepath"
"regexp"
"runtime"
"strconv"
"strings"
...
...
@@ -24,7 +23,7 @@ import (
)
var
(
versionRe
=
regexp
.
MustCompile
(
`-[0-9]{1,3}-g[0-9a-f]{5,10}`
)
//
versionRe = regexp.MustCompile(`-[0-9]{1,3}-g[0-9a-f]{5,10}`)
goarch
string
goos
string
gocc
string
...
...
@@ -44,14 +43,14 @@ var (
isDev
bool
=
false
)
const
minGoVersion
=
1.8
func
main
()
{
log
.
SetOutput
(
os
.
Stdout
)
log
.
SetFlags
(
0
)
ensureGoPath
()
verifyGitRepoIsClean
()
flag
.
StringVar
(
&
goarch
,
"goarch"
,
runtime
.
GOARCH
,
"GOARCH"
)
flag
.
StringVar
(
&
goos
,
"goos"
,
runtime
.
GOOS
,
"GOOS"
)
flag
.
StringVar
(
&
gocc
,
"cc"
,
""
,
"CC"
)
...
...
@@ -352,10 +351,6 @@ func ensureGoPath() {
}
}
func
ChangeWorkingDir
(
dir
string
)
{
os
.
Chdir
(
dir
)
}
func
grunt
(
params
...
string
)
{
if
runtime
.
GOOS
==
"windows"
{
runPrint
(
`.\node_modules\.bin\grunt`
,
params
...
)
...
...
@@ -492,24 +487,6 @@ func buildStamp() int64 {
return
s
}
func
buildArch
()
string
{
os
:=
goos
if
os
==
"darwin"
{
os
=
"macosx"
}
return
fmt
.
Sprintf
(
"%s-%s"
,
os
,
goarch
)
}
func
run
(
cmd
string
,
args
...
string
)
[]
byte
{
bs
,
err
:=
runError
(
cmd
,
args
...
)
if
err
!=
nil
{
log
.
Println
(
cmd
,
strings
.
Join
(
args
,
" "
))
log
.
Println
(
string
(
bs
))
log
.
Fatal
(
err
)
}
return
bytes
.
TrimSpace
(
bs
)
}
func
runError
(
cmd
string
,
args
...
string
)
([]
byte
,
error
)
{
ecmd
:=
exec
.
Command
(
cmd
,
args
...
)
bs
,
err
:=
ecmd
.
CombinedOutput
()
...
...
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