#!/usr/bin/env bash

set -e

export PACKAGE_NAME=$(node -p "require('./package.json').name")
export PACKAGE_VERSION=$(node -p "require('./package.json').version")
export DECLINATION_ID=$(node -p "require('./package.json').declinationId")
export SONAR_VERSION=${PACKAGE_VERSION}-b${CI_PIPELINE_ID}-${CI_COMMIT_REF_NAME}
export NODE_VERSION=$(node --version)
export NPM_VERSION=$(npm --version)
export NPM_REGISTRY=$(node -p "var { publishConfig } = require('./package.json'); publishConfig && publishConfig.registry || 'https://registry.npmjs.org'")
