Skip to content

Commit

Permalink
build: Do not patch .copr/Makefile for releases
Browse files Browse the repository at this point in the history
Change-Id: Iaaf47b701408da9585cacdfc0e8cc59f21845ffe
Signed-off-by: Yedidyah Bar David <didi@redhat.com>
  • Loading branch information
didib committed Aug 22, 2022
1 parent 39af8cb commit 79c53cd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 21 deletions.
3 changes: 2 additions & 1 deletion .copr/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ git_cfg_safe:
git config --global --add safe.directory "$(shell pwd)"

srpm: installdeps git_cfg_safe
$(eval SUFFIX=.git$(shell git rev-parse --short HEAD))
# Set SUFFIX to .git$HASH if we are on a -SNAPSHOT
$(eval SUFFIX=$(shell grep -E "<version" pom.xml | head -n1 | awk -F '[<>]' '/version/{print $3}' | grep -q -- -SNAPSHOT && echo .git$(git rev-parse --short HEAD)))
# changing the spec file as passing -D won't preserve the suffix when rebuilding in mock
sed "s:%{?release_suffix}:${SUFFIX}:" -i ovirt-engine.spec.in
mkdir -p tmp.repos/SOURCES
Expand Down
20 changes: 0 additions & 20 deletions bump_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,26 +40,6 @@ else
# Add changelog to the spec file
sed -i "/^%changelog/a ${CHANGELOG}" ovirt-engine.spec.in

# Adjust copr build config for releasing
patch -p0 --ignore-whitespace .copr/Makefile <<'__EOF__'
diff --git a/.copr/Makefile b/.copr/Makefile
index 51e3299e3e5..b2d4a195740 100644
--- a/.copr/Makefile
+++ b/.copr/Makefile
@@ -9,9 +9,9 @@ git_cfg_safe:
git config --global --add safe.directory "$(shell pwd)"
srpm: installdeps git_cfg_safe
- $(eval SUFFIX=.git$(shell git rev-parse --short HEAD))
+ # $(eval SUFFIX=.git$(shell git rev-parse --short HEAD))
# changing the spec file as passing -D won't preserve the suffix when rebuilding in mock
- sed "s:%{?release_suffix}:${SUFFIX}:" -i ovirt-engine.spec.in
+ # sed "s:%{?release_suffix}:${SUFFIX}:" -i ovirt-engine.spec.in
mkdir -p tmp.repos/SOURCES
make dist
rpmbuild \
__EOF__

# commit
git add -u
git commit -s --message="build: ovirt-engine-${VERSION}"
Expand Down

0 comments on commit 79c53cd

Please sign in to comment.