我有一组 Debian 打包脚本,我希望每次构建时都会增加软件包的版本号。 (即Debian 政策手册)也就是说,第一个版本应该是 PACKAGE-1.0-0
,然后是 PACKAGE-1.0-0
,依此类推(其中 1.0
是 upstream_version
)。有没有一种简单的方法可以指定这个“额外”版本号,而无需在变更日志中创建新条目?
我希望每当特定目标(即构建 deb)时,项目的 Makefile 自动完成此操作
I have a set of Debian packaging scripts and I would like the version number of the package to be incremented each time it is built. (i.e. debian_revision
as specified in the Debian Policy Manual) That is, the first build should be PACKAGE-1.0-0
, then PACKAGE-1.0-0
, and so on (where 1.0
is the upstream_version
). Is there an easy way to specify this "extra" version number without having to create a new entry in the changelog?
I'm looking to have this automatically done by the Makefile for the project whenever a particular target (i.e. deb
is built)
发布评论
评论(1)
dh_*
脚本读取debian/changelog
来构建更改文件并设置版本等。您不应该在不编辑变更日志的情况下更改版本,但是如果您的问题是手动进行的更改,您可以创建一个调用的脚本,或者如果您的问题是在
debian/changelog
上进行的更改,您可以创建一个bash 脚本自动更改版本。dh_*
scripts readdebian/changelog
to build a changes file and set the versions, among other things. You should not change the version without editing the changelog, but if your problem is changes made manually you can make a script that invokesor if your problem is changes made at the
debian/changelog
, you can make a bash script to change the version automatically.