Makefile: clean residual .deb before dpkg-buildpackage
Some checks failed
Forgejo Release postit-deb / release (push) Failing after 1m40s
Some checks failed
Forgejo Release postit-deb / release (push) Failing after 1m40s
The 'mv' step after dpkg-buildpackage was failing with `mv: '../postit_1.0.6-1_amd64.deb' and '/src/_src/../postit_1.0.6-1_amd64.deb' are the same file` because the amd64 .deb from previous CI runs (or from a partial arm64 build that copied the leftover amd64 .deb) was still in the source directory. Remove any postit_*<TAG>-1*.deb, *.buildinfo, and *.changes files before invoking dpkg-buildpackage. The fresh build then writes to ../ without colliding with stale output.
This commit is contained in:
parent
5ea37f51be
commit
f65f73b2c1
1 changed files with 4 additions and 0 deletions
4
Makefile
4
Makefile
|
|
@ -38,6 +38,10 @@ deb:
|
||||||
# step the .deb always comes out as the version hardcoded in
|
# step the .deb always comes out as the version hardcoded in
|
||||||
# debian/changelog.in, regardless of POSTIT_GIT_TAG.
|
# debian/changelog.in, regardless of POSTIT_GIT_TAG.
|
||||||
sed 's/@VERSION@/$(POSTIT_GIT_TAG)/g' debian/changelog.in > debian/changelog
|
sed 's/@VERSION@/$(POSTIT_GIT_TAG)/g' debian/changelog.in > debian/changelog
|
||||||
|
# Remove any residual .deb from previous runs (same name
|
||||||
|
# pattern would otherwise make the final 'mv' complain
|
||||||
|
# about source and destination being the same file).
|
||||||
|
rm -f ../postit_*$(POSTIT_GIT_TAG)-1*.deb ../postit_*.buildinfo ../postit_*.changes
|
||||||
POSTIT_GIT_URL=$(POSTIT_GIT_URL) POSTIT_GIT_TAG=$(POSTIT_GIT_TAG) POSTIT_RUNTIME=$(POSTIT_RUNTIME) \
|
POSTIT_GIT_URL=$(POSTIT_GIT_URL) POSTIT_GIT_TAG=$(POSTIT_GIT_TAG) POSTIT_RUNTIME=$(POSTIT_RUNTIME) \
|
||||||
dpkg-buildpackage -us -uc -b
|
dpkg-buildpackage -us -uc -b
|
||||||
# Move the produced .deb(s) into $POSTIT_OUT_DIR. The version
|
# Move the produced .deb(s) into $POSTIT_OUT_DIR. The version
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue