summaryrefslogtreecommitdiffstats
path: root/debian/helpers/getver.pl
blob: 27a87b4ff857da08bb31be3fad5db5896fb78c82 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/perl

# Extract upstream version from version in changelog.

use warnings;
use strict;

use Dpkg::Changelog::Parse;

my $fields = changelog_parse();
my $v = $fields->{Version}->version();
$v =~ /^([0-9]+\.[0-9]+).*/ or die 'INVALID VERSION! (needs X.Y)';

printf("%s\n", $1);