[arch-releng] archiso: also putting the hour in version string
Gerardo Exequiel Pozzi
vmlinuz386 at yahoo.com.ar
Mon Aug 15 00:43:49 EDT 2011
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
>
> Dieter
>
what do you think about via env var?
#!/bin/bash
set -u -e
version=${RELENG_BUILD_VERSION:-$(date +%Y.%m.%d)}
echo ${version}
Keeping it simply.
$ ./build.sh
2011.08.15
$ RELENG_BUILD_VERSION=76543210 ./build.sh
76543210
--
Gerardo Exequiel Pozzi
\cos^2\alpha + \sin^2\alpha = 1
More information about the arch-releng
mailing list