[PATCH 2/2] Add release generator script

Jan Kiszka jan.kiszka at web.de
Wed Jan 9 15:24:00 CET 2019


On 20.12.18 15:58, Jan Kiszka via Xenomai wrote:
> This encodes
> - updating version-code/label
> - committing the changes
> - tagging the result
> 
> Signed-off-by: Jan Kiszka <jan.kiszka at siemens.com>
> ---
>   scripts/make-release.sh | 35 +++++++++++++++++++++++++++++++++++
>   1 file changed, 35 insertions(+)
>   create mode 100755 scripts/make-release.sh
> 
> diff --git a/scripts/make-release.sh b/scripts/make-release.sh
> new file mode 100755
> index 0000000000..67a191d44e
> --- /dev/null
> +++ b/scripts/make-release.sh
> @@ -0,0 +1,35 @@
> +#! /bin/bash
> +
> +usage() {
> +	echo "usage: $0 name"
> +	exit 1
> +}
> +
> +name=$1
> +
> +if [ -z "$name" ]; then
> +	usage
> +fi
> +
> +if [ ! -f config/version-code ] || [ ! -d .git ]; then
> +	echo "Must be run from top-level directory"
> +	exit 1
> +fi
> +
> +if [ -n "`git status -s -uno`" ]; then
> +	echo "Working directory is dirty!"
> +	exit 1
> +fi
> +
> +echo -e "Tag commit\n\n    `git log -1 --oneline`"
> +echo -e "\nof branch\n\n    `git branch | sed -n 's/^\* //p'`"
> +echo -ne "\nas $name? (y/N) "
> +read answer
> +if [ "$answer" != "y" ]; then
> +	exit 1
> +fi
> +
> +echo $name | sed "s/v//" > config/version-code
> +cp  config/version-code config/version-label
> +git commit -sv config/version-code config/version-label -m "config: Bump version number"
> +git tag -as $name -m "Release $name"
> 

Both applied to next now.

Jan



More information about the Xenomai mailing list