Skip to content

Commit

Permalink
fix(oci): Use same version as deb/rpms
Browse files Browse the repository at this point in the history
  • Loading branch information
BaptisteFoy authored and bengl committed May 29, 2024
1 parent f0c4aeb commit 9bd5965
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .gitlab/build_oci_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,19 @@ npm install --prefix ./packaging/sources/ dd-trace-*.tgz

rm packaging/sources/*.json # package.json and package-lock.json are unneeded

jq --raw-output '.version' package.json > packaging/sources/version
if [ -n "$CI_COMMIT_TAG" ] && [ -z "$JS_PACKAGE_VERSION" ]; then
JS_PACKAGE_VERSION=${CI_COMMIT_TAG##v}
elif [ -z "$CI_COMMIT_TAG" ] && [ -z "$JS_PACKAGE_VERSION" ]; then
JS_PACKAGE_VERSION="$(jq --raw-output '.version' package.json).pipeline.${CI_PIPELINE_ID}.beta.${CI_COMMIT_SHORT_SHA}"
fi
echo -n $JS_PACKAGE_VERSION > packaging/auto_inject-node.version
echo -n $JS_PACKAGE_VERSION > packaging/sources/version

cd packaging

export VERSION=$(<sources/version)

datadog-package create \
--version="$VERSION" \
--version="$JS_PACKAGE_VERSION" \
--package="datadog-apm-library-js" \
--archive=true \
--archive-path="datadog-apm-library-js-$VERSION.tar" \
--archive-path="datadog-apm-library-js-$JS_PACKAGE_VERSION.tar" \
./sources

0 comments on commit 9bd5965

Please sign in to comment.