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
3e62b1b2
Commit
3e62b1b2
authored
Feb 02, 2017
by
bergquist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tech(build): use build number as iteration number
parent
a580113d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
5 deletions
+12
-5
build.go
+7
-1
scripts/build/build.sh
+4
-4
scripts/build/deploy.sh
+1
-0
No files found.
build.go
View file @
3e62b1b2
...
...
@@ -38,6 +38,7 @@ var (
phjsToRelease
string
workingDir
string
includeBuildNumber
bool
=
true
buildNumber
int
=
0
binaries
[]
string
=
[]
string
{
"grafana-server"
,
"grafana-cli"
}
)
...
...
@@ -58,6 +59,7 @@ func main() {
flag
.
StringVar
(
&
phjsToRelease
,
"phjs"
,
""
,
"PhantomJS binary"
)
flag
.
BoolVar
(
&
race
,
"race"
,
race
,
"Use race detector"
)
flag
.
BoolVar
(
&
includeBuildNumber
,
"includeBuildNumber"
,
includeBuildNumber
,
"IncludeBuildNumber in package name"
)
flag
.
IntVar
(
&
buildNumber
,
"buildNumber"
,
0
,
"Build number from CI system"
)
flag
.
Parse
()
readVersionFromPackageJson
()
...
...
@@ -157,7 +159,11 @@ func readVersionFromPackageJson() {
// add timestamp to iteration
if
includeBuildNumber
{
linuxPackageIteration
=
fmt
.
Sprintf
(
"%d%s"
,
time
.
Now
()
.
Unix
(),
linuxPackageIteration
)
if
buildNumber
!=
0
{
linuxPackageIteration
=
fmt
.
Sprintf
(
"%d%s"
,
buildNumber
,
linuxPackageIteration
)
}
else
{
linuxPackageIteration
=
fmt
.
Sprintf
(
"%d%s"
,
time
.
Now
()
.
Unix
(),
linuxPackageIteration
)
}
}
}
...
...
scripts/build/build.sh
View file @
3e62b1b2
...
...
@@ -25,10 +25,10 @@ echo "current dir: $(pwd)"
if
[
"
$CIRCLE_TAG
"
!=
""
]
;
then
echo
"Building a release from tag
$CIRCLE_TAG
"
go run build.go
-includeBuildNumber
=
false
build
go run build.go
-
buildNumber
=
${
CIRCLE_BUILD_NUM
}
-
includeBuildNumber
=
false
build
else
echo
"Building incremental build for
$CIRCLE_BRANCH
"
go run build.go build
go run build.go
-buildNumber
=
${
CIRCLE_BUILD_NUM
}
build
fi
yarn install
--pure-lockfile
...
...
@@ -42,10 +42,10 @@ echo "current dir: $(pwd)"
if
[
"
$CIRCLE_TAG
"
!=
""
]
;
then
echo
"Packaging a release from tag
$CIRCLE_TAG
"
go run build.go
-includeBuildNumber
=
false
package latest
go run build.go
-
buildNumber
=
${
CIRCLE_BUILD_NUM
}
-
includeBuildNumber
=
false
package latest
else
echo
"Packaging incremental build for
$CIRCLE_BRANCH
"
go run build.go package latest
go run build.go
-buildNumber
=
${
CIRCLE_BUILD_NUM
}
package latest
fi
cp dist/
*
/tmp/dist/
...
...
scripts/build/deploy.sh
View file @
3e62b1b2
...
...
@@ -8,4 +8,5 @@ docker run -i -t --name gfbuild \
-v
$(
pwd
)
/dist:/tmp/dist
\
-e
"CIRCLE_BRANCH=
${
CIRCLE_BRANCH
}
"
\
-e
"CIRCLE_TAG=
${
CIRCLE_TAG
}
"
\
-e
"CIRCLE_BUILD_NUM=
${
CIRCLE_BUILD_NUM
}
"
grafana/buildcontainer
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