From 106ae2c28d24b23b1785f20e45abb72384c71cf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Tue, 17 Dec 2024 19:39:57 +0100 Subject: [PATCH] Revert "ci: Use `meson introspect` to generate artifact path" The new release service that now moved into production expects the tag to match the release version. Instead of using the $VERSION-real pattern in case of error, switch to a pre-push hook to hopefully prevent those errors in the first place: https://gitlab.gnome.org/-/snippets/6710 This reverts commit 8c014a6b1da26fd72001064ba7fdfd3b41103e84. Part-of: (cherry picked from commit 0d1b279a64a7988bfd362bc2883f3a2d4e0b5062) --- .gitlab-ci.yml | 21 +-------------------- .gitlab-ci/export-artifact-path | 21 --------------------- 2 files changed, 1 insertion(+), 41 deletions(-) delete mode 100755 .gitlab-ci/export-artifact-path diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index df97d556..54990301 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -149,21 +149,6 @@ fedora-build: paths: - build -fedora-distinfo: - stage: deploy - needs: - - fedora-build - script: - - .gitlab-ci/export-artifact-path build > dist.env - artifacts: - reports: - dotenv: dist.env - paths: - - build - - dist.env - rules: - - if: '$CI_COMMIT_TAG' - fedora-dist: stage: deploy needs: @@ -180,14 +165,10 @@ fedora-dist: fedora-dist-tarball: extends: fedora-dist - needs: - - fedora-distinfo artifacts: expose_as: 'Get tarball here' paths: - - $TARBALL_ARTIFACT_PATH - reports: - dotenv: dist.env + - build/meson-dist/$CI_PROJECT_NAME-$CI_COMMIT_TAG.tar.xz rules: - if: '$CI_COMMIT_TAG' diff --git a/.gitlab-ci/export-artifact-path b/.gitlab-ci/export-artifact-path deleted file mode 100755 index f9a7534f..00000000 --- a/.gitlab-ci/export-artifact-path +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/gjs -m -// SPDX-FileCopyrightText: 2024 Florian Müllner -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import Gio from 'gi://Gio'; -import {programArgs, programInvocationName, exit} from 'system'; - -const [buildDir] = programArgs; -if (!buildDir) { - printerr(`usage: ${programInvocationName} `); - exit(1); -} - -const subprocess = Gio.Subprocess.new( - ['meson', 'introspect', '--projectinfo', buildDir], - Gio.SubprocessFlags.STDOUT_PIPE); -const [, out] = subprocess.communicate_utf8(null, null); - -const {descriptive_name, version} = JSON.parse(out); -print(`TARBALL_ARTIFACT_PATH=${buildDir}/meson-dist/${descriptive_name}-${version}.tar.xz`);