mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
release: Revamp release scripts
Covers bins, voices, manuals, fonts, and source tarballs. Only thing remaining is build-info integration Change-Id: I3a93fd87bbeb725fc8e1b38c5787e33fa00f3f37
This commit is contained in:
parent
c38aeb3fbc
commit
ac9003546f
5 changed files with 114 additions and 118 deletions
|
@ -5,28 +5,30 @@
|
||||||
Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
\/ \/ \/ \/ \/
|
\/ \/ \/ \/ \/
|
||||||
|
|
||||||
This directory contains useful scripts when creating and building
|
This directory the scripts used to create release artifacts. All
|
||||||
releases. The plan is to hopefully create a single top-level script that will
|
generated data is stored in an output directory (called "output").
|
||||||
run everything needed to make a complete and full release and put all
|
|
||||||
generated data into a separate output directory.
|
All of these scripts take two arguments; the git tag and the version string.
|
||||||
|
|
||||||
NOTE that these scripts assume that you have the necessary compilers already
|
NOTE that these scripts assume that you have the necessary compilers already
|
||||||
present in your PATH.
|
present in your PATH.
|
||||||
|
|
||||||
The scripts:
|
The scripts:
|
||||||
|
|
||||||
bins.pl Builds all the binary rockbox zip files.
|
bins.pl Builds all the binary rockbox zip files
|
||||||
|
manuals.pl Builds all manuals (pdf and html-zip)
|
||||||
|
sources.sh Builds the source tarball
|
||||||
|
voices.pl Builds all "complete enough" voice files
|
||||||
|
|
||||||
manuals.pl Builds all manuals
|
Only "stable" targets, their manuals, and a selection of voice files are built;
|
||||||
|
these are designated in tools/builds.pm
|
||||||
|
|
||||||
voices.pl Builds all english voice files
|
Example:
|
||||||
|
|
||||||
tarball.sh Builds the source tarball
|
tools/release/sources.sh v3.15-final 3.15
|
||||||
|
|
||||||
|
Other notes:
|
||||||
|
|
||||||
STATUS
|
* Update www/tools/dailybuild-voices.pl file to add the release target
|
||||||
|
voice list!
|
||||||
All these scripts have a "version" variable at the top that needs editing and
|
* Update release target in tools/builds.pm
|
||||||
each of this script needs to be run at the source tree root to function. Most
|
|
||||||
of them put their generated files in a subdir called 'output' which the
|
|
||||||
scripts create.
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
$version="3.15";
|
require "./tools/builds.pm";
|
||||||
|
|
||||||
require "tools/builds.pm";
|
|
||||||
|
|
||||||
my $verbose;
|
my $verbose;
|
||||||
if($ARGV[0] eq "-v") {
|
if($ARGV[0] eq "-v") {
|
||||||
|
@ -9,53 +7,35 @@ if($ARGV[0] eq "-v") {
|
||||||
shift @ARGV;
|
shift @ARGV;
|
||||||
}
|
}
|
||||||
|
|
||||||
my $update;
|
my $tag = $ARGV[0];
|
||||||
if($ARGV[0] eq "-u") {
|
my $version = $ARGV[1];
|
||||||
$update =1;
|
|
||||||
shift @ARGV;
|
|
||||||
}
|
|
||||||
|
|
||||||
my $doonly;
|
my $outdir = "output/bins";
|
||||||
if($ARGV[0]) {
|
|
||||||
$doonly = $ARGV[0];
|
|
||||||
print "only build $doonly\n" if($verbose);
|
|
||||||
}
|
|
||||||
|
|
||||||
if($update) {
|
my $cpus = `nproc`;
|
||||||
# svn update!
|
|
||||||
system("svn -q up");
|
|
||||||
}
|
|
||||||
|
|
||||||
$rev = `svnversion`;
|
|
||||||
chomp $rev;
|
|
||||||
print "rev $rev\n" if($verbose);
|
|
||||||
|
|
||||||
# made once for all targets
|
# made once for all targets
|
||||||
sub runone {
|
sub runone {
|
||||||
my ($dir, $confnum, $extra)=@_;
|
my ($dir, $confnum, $extra)=@_;
|
||||||
my $a;
|
my $a;
|
||||||
|
|
||||||
if($doonly && ($doonly ne $dir)) {
|
mkdir "buildb-$dir";
|
||||||
return;
|
chdir "buildb-$dir";
|
||||||
}
|
print "Build in buildb-$dir\n" if($verbose);
|
||||||
|
|
||||||
mkdir "build-$dir";
|
|
||||||
chdir "build-$dir";
|
|
||||||
print "Build in build-$dir\n" if($verbose);
|
|
||||||
|
|
||||||
# build the manual(s)
|
# build the manual(s)
|
||||||
$a = buildit($dir, $confnum, $extra);
|
$a = buildit($dir, $confnum, $extra);
|
||||||
|
|
||||||
chdir "..";
|
chdir "..";
|
||||||
|
|
||||||
my $o="build-$dir/rockbox.zip";
|
my $o="buildb-$dir/rockbox.zip";
|
||||||
my $map="build-$dir/rockbox-maps.zip";
|
my $map="buildb-$dir/rockbox-maps.zip";
|
||||||
my $elf="build-$dir/rockbox-elfs.zip";
|
my $elf="buildb-$dir/rockbox-elfs.zip";
|
||||||
if (-f $o) {
|
if (-f $o) {
|
||||||
my $newo="output/rockbox-$dir-$version.zip";
|
my $newo="$outdir/rockbox-$dir-$version.zip";
|
||||||
my $newmap="output/rockbox-$dir-$version-maps.zip";
|
my $newmap="$outdir/rockbox-$dir-$version-maps.zip";
|
||||||
my $newelf="output/rockbox-$dir-$version-elfs.zip";
|
my $newelf="$outdir/rockbox-$dir-$version-elfs.zip";
|
||||||
system("mkdir -p output");
|
system("mkdir -p $outdir");
|
||||||
system("mv $o $newo");
|
system("mv $o $newo");
|
||||||
print "moved $o to $newo\n" if($verbose);
|
print "moved $o to $newo\n" if($verbose);
|
||||||
system("mv $map $newmap");
|
system("mv $map $newmap");
|
||||||
|
@ -74,34 +54,28 @@ sub fonts {
|
||||||
my ($dir, $confnum, $newl)=@_;
|
my ($dir, $confnum, $newl)=@_;
|
||||||
my $a;
|
my $a;
|
||||||
|
|
||||||
if($doonly && ($doonly ne $dir)) {
|
mkdir "buildf-$dir";
|
||||||
return;
|
chdir "buildf-$dir";
|
||||||
}
|
print "Build fonts in buildf-$dir\n" if($verbose);
|
||||||
|
|
||||||
mkdir "build-$dir";
|
|
||||||
chdir "build-$dir";
|
|
||||||
print "Build fonts in build-$dir\n" if($verbose);
|
|
||||||
|
|
||||||
# build the fonts
|
# build the fonts
|
||||||
$a = buildfonts($dir, $confnum, $newl);
|
$a = buildfonts($dir, $confnum, $newl);
|
||||||
|
|
||||||
chdir "..";
|
chdir "..";
|
||||||
|
|
||||||
my $o="build-$dir/rockbox-fonts.zip";
|
my $o="buildf-$dir/rockbox-fonts.zip";
|
||||||
if (-f $o) {
|
if (-f $o) {
|
||||||
my $newo="output/rockbox-fonts-$version.zip";
|
my $newo="$outdir/rockbox-fonts-$version.zip";
|
||||||
system("mv $o $newo");
|
system("mv $o $newo");
|
||||||
print "moved $o to $newo\n" if($verbose);
|
print "moved $o to $newo\n" if($verbose);
|
||||||
}
|
}
|
||||||
|
|
||||||
print "remove all contents in build-$dir\n" if($verbose);
|
print "remove all contents in buildb-$dir\n" if($verbose);
|
||||||
system("rm -rf build-$dir");
|
system("rm -rf buildf-$dir");
|
||||||
|
|
||||||
return $a;
|
return $a;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
sub buildit {
|
sub buildit {
|
||||||
my ($target, $confnum, $extra)=@_;
|
my ($target, $confnum, $extra)=@_;
|
||||||
|
|
||||||
|
@ -114,7 +88,7 @@ sub buildit {
|
||||||
`$c`;
|
`$c`;
|
||||||
|
|
||||||
print "Run 'make'\n" if($verbose);
|
print "Run 'make'\n" if($verbose);
|
||||||
`make VERSION=$version`;
|
`make -j$cpus VERSION=$version`;
|
||||||
|
|
||||||
print "Run 'make zip'\n" if($verbose);
|
print "Run 'make zip'\n" if($verbose);
|
||||||
`make zip VERSION=$version`;
|
`make zip VERSION=$version`;
|
||||||
|
@ -141,14 +115,15 @@ sub buildfonts {
|
||||||
`make fontzip`;
|
`make fontzip`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
`git checkout $tag`;
|
||||||
|
|
||||||
# run make in tools first to make sure they're up-to-date
|
# run make in tools first to make sure they're up-to-date
|
||||||
print "cd tools && make\n" if($verbose);
|
print "cd tools && make\n" if($verbose);
|
||||||
`(cd tools && make ) >/dev/null`;
|
`(cd tools && make ) >/dev/null`;
|
||||||
|
|
||||||
for my $b (&stablebuilds) {
|
for my $b (&usablebuilds) {
|
||||||
my $configname = $builds{$b}{configname} ? $builds{$b}{configname} : $b;
|
my $configname = $builds{$b}{configname} ? $builds{$b}{configname} : $b;
|
||||||
runone($b, $configname, $builds{$b}{ram});
|
runone($b, $configname, $builds{$b}{ram});
|
||||||
}
|
}
|
||||||
|
|
||||||
fonts("fonts", "iaudiox5");
|
fonts("fonts", "iaudiox5");
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
#!/usr/bin/perl
|
#!/usr/bin/perl -w
|
||||||
|
require "./tools/builds.pm";
|
||||||
|
|
||||||
$version="3.15";
|
require "./tools/builds.pm";
|
||||||
|
|
||||||
require "tools/builds.pm";
|
|
||||||
|
|
||||||
my $verbose;
|
my $verbose;
|
||||||
if($ARGV[0] eq "-v") {
|
if($ARGV[0] eq "-v") {
|
||||||
|
@ -10,21 +9,16 @@ if($ARGV[0] eq "-v") {
|
||||||
shift @ARGV;
|
shift @ARGV;
|
||||||
}
|
}
|
||||||
|
|
||||||
my $doonly;
|
my $tag = $ARGV[0];
|
||||||
if($ARGV[0]) {
|
my $version = $ARGV[1];
|
||||||
$doonly = $ARGV[0];
|
|
||||||
print "only build $doonly\n" if($verbose);
|
my $outdir = "output/manuals";
|
||||||
}
|
|
||||||
|
|
||||||
# made once for all targets
|
# made once for all targets
|
||||||
sub runone {
|
sub runone {
|
||||||
my ($dir)=@_;
|
my ($dir)=@_;
|
||||||
my $a;
|
my $a;
|
||||||
|
|
||||||
if($doonly && ($doonly ne $dir)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
mkdir "buildm-$dir";
|
mkdir "buildm-$dir";
|
||||||
chdir "buildm-$dir";
|
chdir "buildm-$dir";
|
||||||
print "Build in buildm-$dir\n" if($verbose);
|
print "Build in buildm-$dir\n" if($verbose);
|
||||||
|
@ -34,16 +28,18 @@ sub runone {
|
||||||
|
|
||||||
chdir "..";
|
chdir "..";
|
||||||
|
|
||||||
my $o="buildm-$dir/manual/rockbox-build.pdf";
|
my $o="buildm-$dir/rockbox-$dir-$version.pdf";
|
||||||
if (-f $o) {
|
if (-f $o) {
|
||||||
my $newo="output/rockbox-$dir-$version.pdf";
|
my $newo="$outdir/rockbox-$dir-$version.pdf";
|
||||||
system("mv $o $newo");
|
system("mv $o $newo");
|
||||||
print "moved $o to $newo\n" if($verbose);
|
print "moved $o to $newo\n" if($verbose);
|
||||||
|
} else {
|
||||||
|
print "buildm-$dir/rockbox-$dir-$version.pdf not found\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
$o="buildm-$dir/rockbox-manual.zip";
|
$o="buildm-$dir/rockbox-manual.zip";
|
||||||
if (-f $o) {
|
if (-f $o) {
|
||||||
my $newo="output/rockbox-$dir-$version-html.zip";
|
my $newo="$outdir/rockbox-$dir-$version-html.zip";
|
||||||
system("mv $o $newo");
|
system("mv $o $newo");
|
||||||
print "moved $o to $newo\n" if($verbose);
|
print "moved $o to $newo\n" if($verbose);
|
||||||
}
|
}
|
||||||
|
@ -64,18 +60,20 @@ sub buildit {
|
||||||
print "C: $c\n" if($verbose);
|
print "C: $c\n" if($verbose);
|
||||||
`$c`;
|
`$c`;
|
||||||
|
|
||||||
print "Run 'make'\n" if($verbose);
|
print "Run 'make manual'\n" if($verbose);
|
||||||
`make manual VERSION=$version 2>/dev/null`;
|
`make manual VERSION=$version 2>/dev/null`;
|
||||||
|
|
||||||
print "Run 'make manual-zip'\n" if($verbose);
|
print "Run 'make manual-zip'\n" if($verbose);
|
||||||
`make manual-zip VERSION=$version 2>/dev/null`;
|
`make manual-zip VERSION=$version 2>/dev/null`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
`git checkout $tag`;
|
||||||
|
|
||||||
# run make in tools first to make sure they're up-to-date
|
# run make in tools first to make sure they're up-to-date
|
||||||
`(cd tools && make ) >/dev/null 2>&1`;
|
`(cd tools && make ) >/dev/null 2>&1`;
|
||||||
|
|
||||||
for my $b (&stablebuilds) {
|
`mkdir -p $outdir`;
|
||||||
next if (length($builds{$b}{configname}) > 0); # no variants
|
|
||||||
|
|
||||||
|
for my $b (&usablebuilds) {
|
||||||
runone($b);
|
runone($b);
|
||||||
}
|
}
|
||||||
|
|
13
tools/release/sources.sh
Executable file
13
tools/release/sources.sh
Executable file
|
@ -0,0 +1,13 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
set -x
|
||||||
|
|
||||||
|
tag=$1
|
||||||
|
version=$2
|
||||||
|
|
||||||
|
outdir="output/source"
|
||||||
|
|
||||||
|
mkdir -p "${outdir}"
|
||||||
|
git archive --prefix=rockbox-$version/ -o "${outdir}/rockbox-source-${version}.tar" ${tag}
|
||||||
|
xz -f "${outdir}/rockbox-source-${version}.tar"
|
|
@ -1,8 +1,5 @@
|
||||||
#!/usr/bin/perl
|
#!/usr/bin/perl -w
|
||||||
|
require "./tools/builds.pm";
|
||||||
$version="3.15";
|
|
||||||
|
|
||||||
require "tools/builds.pm";
|
|
||||||
|
|
||||||
my $verbose;
|
my $verbose;
|
||||||
if($ARGV[0] eq "-v") {
|
if($ARGV[0] eq "-v") {
|
||||||
|
@ -10,61 +7,64 @@ if($ARGV[0] eq "-v") {
|
||||||
shift @ARGV;
|
shift @ARGV;
|
||||||
}
|
}
|
||||||
|
|
||||||
my $doonly;
|
my $tag = $ARGV[0];
|
||||||
if($ARGV[0]) {
|
my $version = $ARGV[1];
|
||||||
$doonly = $ARGV[0];
|
|
||||||
print "only build $doonly\n" if($verbose);
|
my $outdir = "output/voices";
|
||||||
}
|
|
||||||
|
|
||||||
# made once for all targets
|
# made once for all targets
|
||||||
sub runone {
|
sub runone {
|
||||||
my ($dir)=@_;
|
my ($target, $name, $lang, $engine, $voice, $engine_opts)=@_;
|
||||||
my $a;
|
my $a;
|
||||||
|
|
||||||
if($doonly && ($doonly ne $dir)) {
|
print "*** LANGUAGE: $lang\n";
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
mkdir "buildv-$dir";
|
print "Build in buildv-$target-$lang\n" if($verbose);
|
||||||
chdir "buildv-$dir";
|
|
||||||
print "Build in buildv-$dir\n" if($verbose);
|
|
||||||
|
|
||||||
# build the manual(s)
|
mkdir "buildv-$target-$lang";
|
||||||
$a = buildit($dir);
|
chdir "buildv-$target-$lang";
|
||||||
|
|
||||||
chdir "..";
|
# build the voice(s)
|
||||||
|
$a = buildit($target, $lang, $engine, $voice, $engine_opts);
|
||||||
|
|
||||||
my $o="buildv-$dir/english.voice";
|
my $o="$lang.voice";
|
||||||
if (-f $o) {
|
if (-f $o) {
|
||||||
my $newo="output/$dir-$version-english.zip";
|
my $newo="../$outdir/$target/voice-$target-$version-$name.zip";
|
||||||
system("cp $o output/$dir-$version-english.voice");
|
system("mkdir -p ../$outdir/$target");
|
||||||
|
system("mkdir -p .rockbox/langs");
|
||||||
|
system("mkdir -p output/$target");
|
||||||
system("mkdir -p .rockbox/langs");
|
system("mkdir -p .rockbox/langs");
|
||||||
system("cp $o .rockbox/langs");
|
system("cp $o .rockbox/langs");
|
||||||
system("zip -r $newo .rockbox");
|
system("zip -q -r $newo .rockbox");
|
||||||
system("rm -rf .rockbox");
|
system("rm -rf .rockbox");
|
||||||
|
`chmod a+r $newo`;
|
||||||
print "moved $o to $newo\n" if($verbose);
|
print "moved $o to $newo\n" if($verbose);
|
||||||
}
|
}
|
||||||
|
|
||||||
print "remove all contents in buildv-$dir\n" if($verbose);
|
chdir "..";
|
||||||
system("rm -rf buildv-$dir");
|
|
||||||
|
print "remove all contents in buildv-$target-$lang\n" if($verbose);
|
||||||
|
system("rm -rf buildv-$target-$lang");
|
||||||
|
|
||||||
return $a;
|
return $a;
|
||||||
};
|
};
|
||||||
|
|
||||||
sub buildit {
|
sub buildit {
|
||||||
my ($model)=@_;
|
my ($target, $lang, $engine, $voice, $engine_opts)=@_;
|
||||||
|
|
||||||
`rm -rf * >/dev/null 2>&1`;
|
`rm -rf * >/dev/null 2>&1`;
|
||||||
|
|
||||||
my $c = "../tools/configure --type=av --target=$model --language=0 --tts=f --ram=0 --voice=0";
|
my $c = "../tools/configure --no-ccache --type=av --target=$target --ram=-1 --language=$lang --tts=$engine --voice=$voice --ttsopts='$engine_opts'";
|
||||||
|
|
||||||
print "C: $c\n" if($verbose);
|
print "C: $c\n" if($verbose);
|
||||||
`$c`;
|
system($c);
|
||||||
|
|
||||||
print "Run 'make voice'\n" if($verbose);
|
print "Run 'make voice'\n" if($verbose);
|
||||||
print `make voice VERSION=$version 2>/dev/null`;
|
`make voice`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
`git checkout $tag`;
|
||||||
|
|
||||||
# run make in tools first to make sure they're up-to-date
|
# run make in tools first to make sure they're up-to-date
|
||||||
`(cd tools && make ) >/dev/null 2>&1`;
|
`(cd tools && make ) >/dev/null 2>&1`;
|
||||||
|
|
||||||
|
@ -75,8 +75,16 @@ my $pool="$home/tmp/rockbox-voices-$version/voice-pool";
|
||||||
`rm -f $pool/*`;
|
`rm -f $pool/*`;
|
||||||
$ENV{'POOL'}="$pool";
|
$ENV{'POOL'}="$pool";
|
||||||
|
|
||||||
for my $b (&stablebuilds) {
|
`mkdir -p $outdir`;
|
||||||
next if (length($builds{$b}{configname}) > 0); # no variants
|
|
||||||
|
|
||||||
runone($b);
|
for my $b (&usablebuilds) {
|
||||||
|
next if ($builds{$b}{voice}); # no variants
|
||||||
|
|
||||||
|
for my $v (&allvoices) {
|
||||||
|
my %voice = $voices{$v};
|
||||||
|
|
||||||
|
# print " runone $b $v ($voices{$v}->{lang} via $voices{$v}->{defengine})\n";
|
||||||
|
runone($b, $v, $voices{$v}->{lang}, $voices{$v}->{defengine},
|
||||||
|
"-1", $voices{$v}->{engines}->{$voices{$v}->{defengine}});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue