Commit Graph

21 Commits

Author SHA1 Message Date
Gerald Combs 6684583c7c tools: Remove more unused variables from make-version.pl 2022-07-05 10:40:34 -05:00
Gerald Combs 218d290110 tools: Remove unused variables from make-version.pl.
It looks like repo_branch, repo_url, and repo_root have been unused
since faf5f86e7e.
2022-07-05 10:16:19 -05:00
Gerald Combs f17d39db1e CMake+tools: Clean up our build version variables.
In the top-level CMakeLists.txt, fill in PROJECT_BUILD_VERSION directly.
Clean up the WiX PRODUCT_VERSION variable.
2022-07-05 15:00:06 +00:00
Gerald Combs 7b38ff3d9d tools: Remove dead/unused code from make-version.pl.
Remove the "ugly internal SVN file hack" block from make-version.pl. It
only worked for Subversion versions prior to 1.4, which was released in
2006.

Remove the Bazaar (bzr) block. James Brown may not have sang about it,
but even so it's a Git's world.

Remove the Tortoise block. As noted in a comment, it appears to be dead
code.
2022-07-04 21:43:37 +00:00
Gerald Combs 79da670bd1 Packaging+GitLab CI: Move debian to the packaging directory.
We keep our various packaging assets in the "packaging" directory. Move
the Debian assets there. dpkg-buildpackage doesn't seem appear to have a
"debian directory path" option, but symlinking worked in my test
container.
2022-02-13 13:21:58 -08:00
João Valverde d48c7e9305 make-version.pl: Remove duplicate "-f" option 2021-07-09 22:25:20 +01:00
João Valverde ffcfc83ecb Rename version.h to be more descriptive
Version.h is too generic. This is specific to VCSVERSION and that
should be made more obvious and discoverable.
2021-07-09 18:27:41 +00:00
Gerald Combs d23b0b82c4 GitLab CI: Fix our debian-stable version.
Run tools/make-version.pl in the build:debian-stable job.

Make sure make-version.pl updates debian/control correctly.
2021-03-13 16:36:35 +00:00
Dario Lombardo 29b331bf0c make-version: use 0 as number of commits if they can't be obtained.
When running on gitlab-ci, the checkout of the project doesn't give
a complete repo. Then git describe fails at giving the number of commits.
In this case just use 0 instead of NULL.
2020-12-22 17:06:28 +00:00
Gerald Combs 97dcaf97fc Convert Gerrit URLs to GitLab.
Convert various code.wireshark.org URLs to their
gitlab.com/wireshark/wireshark equivalents.

Change-Id: I0150d1bd14208eb451a7de818dce6573363b1d27
2020-08-24 23:31:32 +00:00
Joerg Mayer c3066b647e make-version.pl: Update sample output in comments to more modern git version 2.24.3 (Apple Git-128)
Change-Id: I2c204d315fd2648953b536a825f6c7d9c9b04827
Reviewed-on: https://code.wireshark.org/review/38138
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2020-08-13 19:53:15 +00:00
Peter Wu 86a35ac6a2 cmake: allow VCSVERSION to be overridden with VCSVERSION_OVERRIDE
The default VCSVERSION from make-version.pl is based on the "git
archive" information (for tarballs) or uses "git describe" to discover
the version. Distributors such as Debian who directly build from a Git
repository might want to include a deterministic value, therefore add a
new option to achieve this.

Change-Id: I5a39670519f4d846020d917b124fc4d548d00137
Reviewed-on: https://code.wireshark.org/review/34100
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-08-12 20:26:32 +00:00
Guy Harris 20800366dd HTTPS (almost) everywhere.
Change all wireshark.org URLs to use https.

Fix some broken links while we're at it.

Change-Id: I161bf8eeca43b8027605acea666032da86f5ea1c
Reviewed-on: https://code.wireshark.org/review/34089
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-07-26 18:44:40 +00:00
Peter Wu 5d515bd0f3 make-version: remove defunct --git-description option
This option always writes "1" when supplied because of a missing "=s" in
the argument specification. Aside from that, the regex would produce the
wrong output for tagged releases. Finally, this command line approach
would never have worked since version.h is always overwritten by CMake.

Change-Id: I83a4bc3c48a41d566bf70991d2ab181b85071488
Reviewed-on: https://code.wireshark.org/review/33711
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-06-24 08:50:30 +00:00
Peter Wu a68627ae96 version: include version information for tarballs from git
Embed the git commit hash as well as the tag information for tarballs
produced by 'git archive' (this includes the Github tarball). Example:

    TShark (Wireshark) 3.0.1 (Git commit ea351cd80516)

Note that the embedded git ref names can include branch information, see
for example `git log -n1 -s --format=%D v3.0.1`:

    tag: wireshark-3.0.1, tag: v3.0.1
    HEAD -> bug/15544, tag: v99.99
    HEAD, origin/master, origin/HEAD, master

Thus, when creating release tarballs, I would recommend using the above
command to see whether unnecessary branch information is present. If so,
create a new post-release commit first on the same branch. This way, the
release tarballs should be reproducible.

While at it, increase the commit abbreviation length from 8 to 12.
Currently git describe abbreviates to 10 by default. The default length
is at minimum 7 and is dependent on the number of objects:

    git count-objects -v | perl -lne 'print int(log($1)/log(2)/2)+1 if /^in-pack: (\d+)/'

Bug: 15544
Change-Id: Ifd1ed636b69f7687a7272775686f51387040a596
Reviewed-on: https://code.wireshark.org/review/33214
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2019-05-16 17:31:50 +00:00
Moshe Kaplan feb931e2f8 Quiet output of make-version.pl
Change-Id: Iefd53ad630f1dabc154c5b5a940e58288a91aa6e
Reviewed-on: https://code.wireshark.org/review/32623
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-04-03 18:02:23 +00:00
Gerald Combs b658de2fa7 Rename our .asciidoc files to .adoc
As noted in "AsciiDoc Recommended Practices" at
https://asciidoctor.org/docs/asciidoc-recommended-practices/, the
AsciiDoc/Asciidoctor community seems to have settled on ".adoc" as a
file extension and that's the one preferred by the Asciidoctor project.
Update our filenames to match.

Change-Id: I2d352623d42d65d950b64310c3655b0fd177ee8c
Reviewed-on: https://code.wireshark.org/review/32037
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-02-15 05:17:26 +00:00
Gerald Combs 68efe641c8 make-version.pl: Fix version variable checks.
Use "defined" instead of checking the variable's value (which might
be zero).

Change-Id: Id24aa25971f73526761c9821846ac0abcf252978
Reviewed-on: https://code.wireshark.org/review/31882
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-02-04 23:21:27 +00:00
Gerald Combs 525c5c1743 make-version.pl: Add a comment about version.h.
Note that we might want to give CMakeLists.txt the ability to generate
version.h independently.

Change-Id: I4864504790aee4c40805f5ae3584db027a2762f5
Reviewed-on: https://code.wireshark.org/review/31569
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-01-17 00:50:36 +00:00
Gerald Combs 1f2f253424 make-version.pl updates.
Read our major, minor, and micro versions from CMakeLists.txt.

Add the ability to set our extra version information differently if our
Git commit is tagged or untagged. Change our extra version placeholder
from "%#" to "{vcsinfo}".

Add --tagged-version-extra (-t) and --untagged-version-extra (-u)
arguments for specifying the tagged and untagged extra formats. Add
--force-extra (-f) so that we can force one format or the other.

Require the major.minor.micro version to be specified when using
--set-version (-v).

Update appveyor.yml and the Developer's Guide to match the new behavior.

Change-Id: I6e5d55470aff7e7c61e75f208e24c4105276905a
Reviewed-on: https://code.wireshark.org/review/31479
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-01-15 19:20:27 +00:00
Gerald Combs 1243976ccd Move make-version.pl to tools.
Move make-version.pl to the tools directory.

Change-Id: I7c3ec8951a682d45d650e3fdb1580d90bf19e8b4
Reviewed-on: https://code.wireshark.org/review/31473
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-01-10 05:18:29 +00:00