Unable to determine project version info in multipass build environment


I previously use the following override-pull scriptlet to generate the snap version:

	snapcraftctl pull

		git \
			describe \
			--always \
			--dirty=-d \
			--tags \
		| sed s/^v//

		git \
			-C .. \
			describe \
			--abbrev=4 \
			--always \
			--match nothing \

	snapcraftctl set-version \

However, when building the snap using the multipass build environment the script fails on the packaging_revision parameter assignment as the parts directory(/root/parts in the multipass VM) no longer reside in the VCS source tree(/root/project in the multipass VM).

Is there any way to get around this without any hacks and workarounds?


Bumping topic…