summaryrefslogtreecommitdiffstats
path: root/tools/build-info.pl
blob: fb89a804417a13df2089628191b2140b4b80c73a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/usr/bin/perl
#             __________               __   ___.
#   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
#   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
#   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
#   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
#                     \/            \/     \/    \/            \/
#
# Generate the build-info.release file found on download.rockbox.org

require "./builds.pm";

my $baseurl="https://download.rockbox.org";

print "[release]\n";
print "build_url=$baseurl/release/%VERSION%/rockbox-%TARGET%-%VERSION%.zip\n";
print "voice_url=$baseurl/release/%VERSION%/%TARGET%-%VERSION%-%LANGUAGE%.zip\n";
print "manual_url=$baseurl/release/%VERSION%/rockbox-%TARGET%-%VERSION%%FORMAT%\n";
print "font_url=$baseurl/release/%VERSION%/rockbox-fonts-%VERSION%.zip\n";
print "source_url=$baseurl/release/%VERSION%/rockbox-%VERSION%.7z\n";

foreach my $b (&stablebuilds) {
    my $ver;
    if(exists($builds{$b}{release})) {
	$ver = $builds{$b}{release};
    } else {
	$ver = $publicrelease;
    }
    if ($ver <= $publicrelease) {
        print "$b=$ver\n";
    }
}

print "[status]\n";

foreach my $b (&allbuilds) {
    my $ver;
    my $status = $builds{$b}{status};

    if(exists($builds{$b}{release})) {
	$ver = $builds{$b}{release};
    } else {
	$ver = $publicrelease;
    }
    if ($ver > $publicrelease) {
        $status=2;
    }
    print "$b=$status\n";
}

print "\n";