Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
polkadot-sdk
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
parity
Mirrored projects
polkadot-sdk
Commits
810c391d
Commit
810c391d
authored
6 years ago
by
gabriel klawitter
Committed by
Gav Wood
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
check spec_version and impl_version (#1743)
parent
e5dbcf68
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
substrate/scripts/gitlab/check_runtime.sh
+33
-19
33 additions, 19 deletions
substrate/scripts/gitlab/check_runtime.sh
with
33 additions
and
19 deletions
substrate/scripts/gitlab/check_runtime.sh
+
33
−
19
View file @
810c391d
...
...
@@ -13,6 +13,7 @@ git log --graph --oneline --decorate=short -n 10
RUNTIME
=
"node/runtime/wasm/target/wasm32-unknown-unknown/release/node_runtime.compact.wasm"
VERSIONS_FILE
=
"node/runtime/src/lib.rs"
...
...
@@ -31,28 +32,33 @@ fi
# check for spec_version updates
add_spec_version
=
"
$(
git diff origin/master...
${
CI_COMMIT_SHA
}
node/runtime/src/lib.rs
\
|
sed
-n
-r
's/^\+[[:space:]]+spec_version: +([0-9]+),$/\1/p'
)
"
sub_spec_version
=
"
$(
git diff origin/master...
${
CI_COMMIT_SHA
}
node/runtime/src/lib.rs
\
|
sed
-n
-r
's/^\-[[:space:]]+spec_version: +([0-9]+),$/\1/p'
)
"
# see if the spec version and the binary blob changed
if
git diff
--name-only
origin/master...
${
CI_COMMIT_SHA
}
\
|
grep
-q
"
${
RUNTIME
}
"
&&
\
[
"
${
add_spec_version
}
"
!=
"
${
sub_spec_version
}
"
]
then
cat
<<-
EOT
# check for version updates
for
version
in
spec_version impl_version
do
add_version
=
"
$(
git diff origin/master...
${
CI_COMMIT_SHA
}
${
VERSIONS_FILE
}
\
|
sed
-n
-r
"s/^
\+
[[:space:]]+
${
version
}
: +([0-9]+),
$/
\1
/p"
)
"
sub_version
=
"
$(
git diff origin/master...
${
CI_COMMIT_SHA
}
${
VERSIONS_FILE
}
\
|
sed
-n
-r
"s/^
\-
[[:space:]]+
${
version
}
: +([0-9]+),
$/
\1
/p"
)
"
# see if the version and the binary blob changed
if
git diff
--name-only
origin/master...
${
CI_COMMIT_SHA
}
\
|
grep
-q
"
${
RUNTIME
}
"
&&
\
[
"
${
add_version
}
"
!=
"
${
sub_version
}
"
]
then
cat
<<-
EOT
changes to the runtime sources and changes in the spec version and wasm
binary blob.
${
version
}
:
${
sub_version
}
->
${
add_version
}
changes to the runtime sources and changes in the spec version and wasm
binary blob.
EOT
exit
0
fi
done
spec_version:
${
sub_spec_version
}
->
${
add_spec_version
}
EOT
exit
0
fi
cat
<<-
EOT
...
...
@@ -60,6 +66,14 @@ cat <<-EOT
wasm source files changed but not the spec version and the runtime
binary blob. This may break the api.
source file directories:
- node/src/runtime
- srml
- core/sr-*
versions file:
${
VERSIONS_FILE
}
EOT
echo
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment