[arch-releng] archiso: also putting the hour in version string

Dieter Plaetinck dieter at plaetinck.be
Mon Aug 15 13:14:09 EDT 2011


On Mon, 15 Aug 2011 01:43:49 -0300
Gerardo Exequiel Pozzi <vmlinuz386 at yahoo.com.ar> wrote:

> On 08/14/2011 08:13 AM, Dieter Plaetinck wrote:
> > Hi,
> > I would like to run multiple builds per day. For this I would like to also put the hour of building in the iso filenames.
> >
> >
> > something like:
> >
> > diff --git a/configs/releng/build.sh b/configs/releng/build.sh
> > index 1aa80fd..7fce685 100755
> > --- a/configs/releng/build.sh
> > +++ b/configs/releng/build.sh
> > @@ -4,7 +4,7 @@ set -e -u
> >
> >   name=archlinux
> >   iso_label="ARCH_$(date +%Y%m)"
> > -version=$(date +%Y.%m.%d)
> > +version=$(date +%Y.%m.%d.%H)
> >   install_dir=arch
> >   arch=$(uname -m)
> >   work_dir=work
> >
> >
> >
> > Or, maybe this is too releng-specific (i.e. most people who run archiso probably prefer $(date +%Y.%m.%d), in which case: can you give archiso a flag so that I can control the version as a parameter?
> >
> > ./build.sh all_iso_single 2011.08.14.12
> > ./build.sh all_iso_dual 2011.08.14.12
> > ./build.sh all_iso_dual 2011.08.14-lets-try-some-new-code
> >
> > passing it as a flag would also be more robust.  Things could go wrong (I think?) if the all_iso_single runs at 23:45 of one day and all_iso_dual runs at 00:15 the next morning.
> Do not worry about this. You guess about LABEL? Not an issue, LABEL for 
> dual is also generated at build time (not read from "single" work). Also 
> you can have a 201112 and 201201. :P

That's the point. If I build multiple isos after each other (like first single isos, then duals) I want all of them to have the same version.

> what do you think about via env var?

It's possible but I don't like it.  If we already have option passing through cmdline args, I think we should pass new options that way too.
Also it makes it very clear to the user what you can do (implenting ./build.sh -h which would show all flags with explanation)
while you're at it, probably a good idea to use getopt and make verbosity also controllable with a flag. (now my code needs to call sed on your script..)

Dieter


More information about the arch-releng mailing list