It is less than obvious how to configure that and it requires conditional switches in order to swap release and snapshot repository as well as version mask.
A small summary of changes so far (I’ll try to come with a PR):
# build.bnd
# important part - centralize version management with static qualifier,
# this qualifier is substituted with ${-snapshot} instruction.
Bundle-Version: 1.0.0.SNAPSHOT
-include: ${if;${def;release};\
${.}/release.bnd;\
${.}/snapshot.bnd\
}
# Reproducible build - do not put headers which insert build timestamp, other than we wish
-noextraheaders: true
-reproducible: true
#--
# snapshot.bnd
-snapshot: ${tstamp}
-pom: \
groupid=io.openems, \
version=${versionmask;===;${@version}}-SNAPSHOT
#--
# release.bnd
-pom: \
groupid=io.openems, \
version=${versionmask;===;${@version}}