File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3939
4040 - name : Sync metainfo version from Cargo.toml
4141 run : |
42- VERSION=$(grep '^version = ' Cargo.toml | head -1 | sed 's/version = "\(.*\)"/\1/ ')
42+ VERSION=$(cargo metadata --format-version=1 --no-deps | jq -r '.packages[] | select(.name == "dash-evo-tool") | .version ')
4343 if [ -z "$VERSION" ]; then
4444 echo "::error::Failed to extract version from Cargo.toml"
4545 exit 1
Original file line number Diff line number Diff line change @@ -174,7 +174,7 @@ jobs:
174174 - name : Extract version from Cargo.toml
175175 id : version
176176 run : |
177- VERSION=$(grep '^version = ' Cargo.toml | head -1 | sed 's/version = "\(.*\)"/\1/ ')
177+ VERSION=$(cargo metadata --format-version=1 --no-deps | jq -r '.packages[] | select(.name == "dash-evo-tool") | .version ')
178178 if [ -z "$VERSION" ]; then
179179 echo "::error::Failed to extract version from Cargo.toml"
180180 exit 1
@@ -485,7 +485,7 @@ jobs:
485485 - name : Extract version from Cargo.toml
486486 id : version
487487 run : |
488- VERSION=$(grep '^version = ' Cargo.toml | head -1 | sed 's/version = "\(.*\)"/\1/ ')
488+ VERSION=$(cargo metadata --format-version=1 --no-deps | jq -r '.packages[] | select(.name == "dash-evo-tool") | .version ')
489489 if [ -z "$VERSION" ]; then
490490 echo "::error::Failed to extract version from Cargo.toml"
491491 exit 1
You can’t perform that action at this time.
0 commit comments