Skip to content

Commit

Permalink
release: Bump FMF plan refs in release-koji
Browse files Browse the repository at this point in the history
As of today, Fedora dist-git FMF test plans have to specify a git repo
and fixed ref for where to find the tests to run.
(teemtee/tmt#585)

We don't want to bump this manually on every release, so teach
release-koji to do that automatically for every old version that appears
in plans/*.fmf.

This can be dropped once there is a way to just run the tests from the
upstream tarball in the dist-git, or run any "pre-discover" code.
  • Loading branch information
martinpitt committed Mar 22, 2021
1 parent 3949be0 commit 2ef3f6c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion release/release-koji
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,17 @@ prepare()
echo "/$file" >> $WORKDIR/.gitignore
done

# until FMF has a way to determine the ref dynamically: https://github.com/psss/tmt/issues/585
trace "Updating FMF plan refs"
if files=$(git -C $WORKDIR grep -l "ref.*$oldver" plans/*.fmf); then
(cd $WORKDIR; sed -i "/ref:/ s/\b${oldver}\b/${version}/" "$files")
ADD_FMF=plans
fi

trace "Committing changes"

# Add the the sources file and spec file
git -C $WORKDIR add sources $PACKAGE.spec .gitignore
git -C $WORKDIR add sources $PACKAGE.spec .gitignore ${ADD_FMF:-}

# Commit all of that with an appropriate message
(
Expand Down

0 comments on commit 2ef3f6c

Please sign in to comment.