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
1631c8de
Commit
1631c8de
authored
Feb 28, 2017
by
bergquist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
build: use correct version for tar.gz files
parent
a763285d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
8 deletions
+19
-8
build.go
+19
-8
No files found.
build.go
View file @
1631c8de
...
@@ -20,6 +20,7 @@ import (
...
@@ -20,6 +20,7 @@ import (
"strconv"
"strconv"
"strings"
"strings"
"time"
"time"
"path"
)
)
var
(
var
(
...
@@ -120,14 +121,24 @@ func main() {
...
@@ -120,14 +121,24 @@ func main() {
}
}
func
makeLatestDistCopies
()
{
func
makeLatestDistCopies
()
{
rpmIteration
:=
"-1"
files
,
err
:=
ioutil
.
ReadDir
(
"dist"
)
if
linuxPackageIteration
!=
""
{
if
err
!=
nil
{
rpmIteration
=
linuxPackageIteration
log
.
Fatalf
(
"failed to create latest copies. Cannot read from /dist"
)
}
latestMapping
:=
map
[
string
]
string
{
".deb"
:
"dist/grafana_latest_amd64.deb"
,
".rpm"
:
"dist/grafana-latest-1.x86_64.rpm"
,
".tar.gz"
:
"dist/grafana-latest.linux-x64.tar.gz"
,
}
}
runError
(
"cp"
,
fmt
.
Sprintf
(
"dist/grafana_%v-%v_amd64.deb"
,
linuxPackageVersion
,
linuxPackageIteration
),
"dist/grafana_latest_amd64.deb"
)
for
_
,
file
:=
range
files
{
runError
(
"cp"
,
fmt
.
Sprintf
(
"dist/grafana-%v-%v.x86_64.rpm"
,
linuxPackageVersion
,
rpmIteration
),
"dist/grafana-latest-1.x86_64.rpm"
)
for
extension
,
fullName
:=
range
latestMapping
{
runError
(
"cp"
,
fmt
.
Sprintf
(
"dist/grafana-%v-%v.linux-x64.tar.gz"
,
linuxPackageVersion
,
linuxPackageIteration
),
"dist/grafana-latest.linux-x64.tar.gz"
)
if
strings
.
HasSuffix
(
file
.
Name
(),
extension
)
{
runError
(
"cp"
,
path
.
Join
(
"dist"
,
file
.
Name
()),
fullName
)
}
}
}
}
}
func
readVersionFromPackageJson
()
{
func
readVersionFromPackageJson
()
{
...
@@ -332,9 +343,9 @@ func grunt(params ...string) {
...
@@ -332,9 +343,9 @@ func grunt(params ...string) {
func
gruntBuildArg
(
task
string
)
[]
string
{
func
gruntBuildArg
(
task
string
)
[]
string
{
args
:=
[]
string
{
task
}
args
:=
[]
string
{
task
}
if
includeBuildNumber
{
if
includeBuildNumber
{
args
=
append
(
args
,
fmt
.
Sprintf
(
"--pkgVer=%v-%v"
,
linuxPackageV
ersion
,
linuxPackageIteration
))
args
=
append
(
args
,
fmt
.
Sprintf
(
"--pkgVer=%v-%v"
,
v
ersion
,
linuxPackageIteration
))
}
else
{
}
else
{
args
=
append
(
args
,
fmt
.
Sprintf
(
"--pkgVer=%v"
,
linuxPackageV
ersion
))
args
=
append
(
args
,
fmt
.
Sprintf
(
"--pkgVer=%v"
,
v
ersion
))
}
}
if
pkgArch
!=
""
{
if
pkgArch
!=
""
{
args
=
append
(
args
,
fmt
.
Sprintf
(
"--arch=%v"
,
pkgArch
))
args
=
append
(
args
,
fmt
.
Sprintf
(
"--arch=%v"
,
pkgArch
))
...
...
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