Skip to content

Commit 2b82d89

Browse files
committed
gnu version: extract the info from uutils/util/build-gnu.sh to avoid duplication
1 parent 6cf5b06 commit 2b82d89

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

.github/workflows/GnuTests.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ env:
2929
TEST_ROOT_FULL_SUMMARY_FILE: 'gnu-root-full-result.json'
3030
TEST_SELINUX_FULL_SUMMARY_FILE: 'selinux-gnu-full-result.json'
3131
TEST_SELINUX_ROOT_FULL_SUMMARY_FILE: 'selinux-root-gnu-full-result.json'
32-
REPO_GNU_REF: "v9.8"
3332

3433
jobs:
3534
native:
@@ -42,6 +41,16 @@ jobs:
4241
with:
4342
path: 'uutils'
4443
persist-credentials: false
44+
- name: Extract GNU version from build-gnu.sh
45+
id: gnu-version
46+
run: |
47+
GNU_VERSION=$(grep '^release_tag_GNU=' uutils/util/build-gnu.sh | cut -d'"' -f2)
48+
if [ -z "$GNU_VERSION" ]; then
49+
echo "Error: Failed to extract GNU version from build-gnu.sh"
50+
exit 1
51+
fi
52+
echo "REPO_GNU_REF=${GNU_VERSION}" >> $GITHUB_ENV
53+
echo "Extracted GNU version: ${GNU_VERSION}"
4554
- uses: dtolnay/rust-toolchain@master
4655
with:
4756
toolchain: stable
@@ -164,6 +173,16 @@ jobs:
164173
with:
165174
path: 'uutils'
166175
persist-credentials: false
176+
- name: Extract GNU version from build-gnu.sh
177+
id: gnu-version-selinux
178+
run: |
179+
GNU_VERSION=$(grep '^release_tag_GNU=' uutils/util/build-gnu.sh | cut -d'"' -f2)
180+
if [ -z "$GNU_VERSION" ]; then
181+
echo "Error: Failed to extract GNU version from build-gnu.sh"
182+
exit 1
183+
fi
184+
echo "REPO_GNU_REF=${GNU_VERSION}" >> $GITHUB_ENV
185+
echo "Extracted GNU version: ${GNU_VERSION}"
167186
- uses: dtolnay/rust-toolchain@master
168187
with:
169188
toolchain: stable

0 commit comments

Comments
 (0)