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
3ef077c1
Commit
3ef077c1
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
7d897c09
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 @
3ef077c1
...
...
@@ -20,6 +20,7 @@ import (
"strconv"
"strings"
"time"
"path"
)
var
(
...
...
@@ -120,14 +121,24 @@ func main() {
}
func
makeLatestDistCopies
()
{
rpmIteration
:=
"-1"
if
linuxPackageIteration
!=
""
{
rpmIteration
=
linuxPackageIteration
files
,
err
:=
ioutil
.
ReadDir
(
"dist"
)
if
err
!=
nil
{
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"
)
runError
(
"cp"
,
fmt
.
Sprintf
(
"dist/grafana-%v-%v.x86_64.rpm"
,
linuxPackageVersion
,
rpmIteration
),
"dist/grafana-latest-1.x86_64.rpm"
)
runError
(
"cp"
,
fmt
.
Sprintf
(
"dist/grafana-%v-%v.linux-x64.tar.gz"
,
linuxPackageVersion
,
linuxPackageIteration
),
"dist/grafana-latest.linux-x64.tar.gz"
)
for
_
,
file
:=
range
files
{
for
extension
,
fullName
:=
range
latestMapping
{
if
strings
.
HasSuffix
(
file
.
Name
(),
extension
)
{
runError
(
"cp"
,
path
.
Join
(
"dist"
,
file
.
Name
()),
fullName
)
}
}
}
}
func
readVersionFromPackageJson
()
{
...
...
@@ -332,9 +343,9 @@ func grunt(params ...string) {
func
gruntBuildArg
(
task
string
)
[]
string
{
args
:=
[]
string
{
task
}
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
{
args
=
append
(
args
,
fmt
.
Sprintf
(
"--pkgVer=%v"
,
linuxPackageV
ersion
))
args
=
append
(
args
,
fmt
.
Sprintf
(
"--pkgVer=%v"
,
v
ersion
))
}
if
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