From c7eab2f6f48f415e0cb2e123d933a14f325eb32d Mon Sep 17 00:00:00 2001 From: Alexander Olofsson <alexander.olofsson@liu.se> Date: Wed, 22 Nov 2023 13:52:03 +0100 Subject: [PATCH] Clean up extracted CI information --- .gitlab-ci.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 82ce462..f463831 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -43,14 +43,13 @@ gemfile: script: - gem build liudesk_cmdb.gemspec - | - # Generate release info + # Extract gem info GEMFILE="$(ls -1 liudesk_cmdb-*.gem)" GEMNAME="$(basename -s '.gem' "${GEMFILE}")" - GEMVERSION="${GEMNAME#*-}" cat <<EOF > variables.env CI_RUBY_GEMFILE="$GEMFILE" - CI_RUBY_GEMNAME="$GEMNAME" - CI_RUBY_VERSION="$GEMVERSION" + CI_RUBY_GEMNAME="${GEMNAME%%-*}" + CI_RUBY_GEMVERSION="${GEMNAME#*-}" EOF cat variables.env artifacts: -- GitLab