Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
03c0061b
Unverified
Commit
03c0061b
authored
Oct 23, 2023
by
protolambda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
devnet: set git commit/date build-args, handle op-program/challenger/node version format cases
parent
a0d6c4c5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
8 deletions
+23
-8
__init__.py
bedrock-devnet/devnet/__init__.py
+7
-2
main.go
op-challenger/cmd/main.go
+5
-1
main.go
op-node/cmd/main.go
+6
-4
main.go
op-program/host/cmd/main.go
+5
-1
No files found.
bedrock-devnet/devnet/__init__.py
View file @
03c0061b
...
...
@@ -94,8 +94,13 @@ def main():
devnet_l1_genesis
(
paths
)
return
log
.
info
(
'Building docker images'
)
run_command
([
'docker'
,
'compose'
,
'build'
,
'--progress'
,
'plain'
],
cwd
=
paths
.
ops_bedrock_dir
,
env
=
{
git_commit
=
subprocess
.
run
([
'git'
,
'rev-parse'
,
'HEAD'
],
capture_output
=
True
,
text
=
True
)
.
stdout
.
strip
()
git_date
=
subprocess
.
run
([
'git'
,
'show'
,
'-s'
,
"--format='
%
ct'"
],
capture_output
=
True
,
text
=
True
)
.
stdout
.
strip
()
log
.
info
(
f
'Building docker images for git commit {git_commit} ({git_date})'
)
run_command
([
'docker'
,
'compose'
,
'build'
,
'--progress'
,
'plain'
,
'--build-arg'
,
f
'GIT_COMMIT={git_commit}'
,
'--build-arg'
,
f
'GIT_DATE={git_date}'
],
cwd
=
paths
.
ops_bedrock_dir
,
env
=
{
'PWD'
:
paths
.
ops_bedrock_dir
,
'DOCKER_BUILDKIT'
:
'1'
,
# (should be available by default in later versions, but explicitly enable it anyway)
'COMPOSE_DOCKER_CLI_BUILD'
:
'1'
# use the docker cache
...
...
op-challenger/cmd/main.go
View file @
03c0061b
...
...
@@ -24,7 +24,11 @@ var (
var
VersionWithMeta
=
func
()
string
{
v
:=
version
.
Version
if
GitCommit
!=
""
{
v
+=
"-"
+
GitCommit
[
:
8
]
if
len
(
GitCommit
)
>=
8
{
v
+=
"-"
+
GitCommit
[
:
8
]
}
else
{
v
+=
"-"
+
GitCommit
}
}
if
GitDate
!=
""
{
v
+=
"-"
+
GitDate
...
...
op-node/cmd/main.go
View file @
03c0061b
...
...
@@ -31,10 +31,12 @@ var (
// VersionWithMeta holds the textual version string including the metadata.
var
VersionWithMeta
=
func
()
string
{
v
:=
version
.
Version
if
len
(
GitCommit
)
>=
8
{
v
+=
"-"
+
GitCommit
[
:
8
]
}
else
{
v
+=
"-"
+
GitCommit
if
GitCommit
!=
""
{
if
len
(
GitCommit
)
>=
8
{
v
+=
"-"
+
GitCommit
[
:
8
]
}
else
{
v
+=
"-"
+
GitCommit
}
}
if
GitDate
!=
""
{
v
+=
"-"
+
GitDate
...
...
op-program/host/cmd/main.go
View file @
03c0061b
...
...
@@ -21,7 +21,11 @@ var (
var
VersionWithMeta
=
func
()
string
{
v
:=
version
.
Version
if
GitCommit
!=
""
{
v
+=
"-"
+
GitCommit
[
:
8
]
if
len
(
GitCommit
)
>=
8
{
v
+=
"-"
+
GitCommit
[
:
8
]
}
else
{
v
+=
"-"
+
GitCommit
}
}
if
GitDate
!=
""
{
v
+=
"-"
+
GitDate
...
...
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