Skip to content

Commit f91b5a7

Browse files
committed
simplify workflow
1 parent 1b67de2 commit f91b5a7

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

.gitlab/publish.yml

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,7 @@ variables:
2323
libdd-profiling-protobuf
2424
libdd-profiling
2525
26-
debug_variables:
27-
tags: ["arch:amd64"]
28-
image: registry.ddbuild.io/images/base/ubuntu_2204:latest
29-
script:
30-
- env | grep CI_
26+
# TODO: create a image with git, build-essential, curl, jq and rustup
3127

3228
# Detect and sort tags
3329
detect_tags:
@@ -135,17 +131,11 @@ publish_crates:
135131
echo "✓ Crate is in allowed list"
136132
echo ""
137133
138-
# Build and test
139-
echo "--- Building and testing $CRATE_NAME ---"
140-
cargo build --package "$CRATE_NAME" --release
141-
cargo test --package "$CRATE_NAME"
142-
echo "✓ Build and tests passed"
143-
echo ""
144-
145134
# Validate version from tag corresponds to the one in the Cargo.toml
146135
# If not, print a warning and skip the publication
147-
if [ "$CRATE_VERSION" != "$(cargo metadata --format-version 1 | jq -r '.packages[0].version')" ]; then
148-
echo "⚠️ WARNING: Version from tag $CRATE_VERSION does not match the one in the Cargo.toml $(cargo metadata --format-version 1 | jq -r '.packages[0].version')"
136+
MANIFEST_VERSION=$(cargo metadata --format-version=1 --no-deps | jq -e -r '.packages[] | select(.name == "'"$CRATE_NAME"'") | .version')
137+
if [ "$CRATE_VERSION" != "$MANIFEST_VERSION" ]; then
138+
echo "⚠️ WARNING: Version from tag $CRATE_VERSION does not match the one in the Cargo.toml $MANIFEST_VERSION"
149139
continue
150140
fi
151141

0 commit comments

Comments
 (0)