ACK: [PATCH] update_version.sh: also update version in snapcraft.yaml

Alex Hung alex.hung at canonical.com
Mon May 21 18:39:50 UTC 2018


On 2018-05-18 03:44 AM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
> 
> We need to keep the snapcraft version in-sync too, so use sed
> to edit this and keep it up to date.
> 
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
>   update_version.sh | 6 ++++++
>   1 file changed, 6 insertions(+)
> 
> diff --git a/update_version.sh b/update_version.sh
> index 3d4d0517..675f53bf 100755
> --- a/update_version.sh
> +++ b/update_version.sh
> @@ -26,8 +26,14 @@ cat << EOF > src/lib/include/fwts_version.h
>    *
>    */
>   EOF
> +# Update fwts_version
>   echo '#define FWTS_VERSION "'$version'"' >> src/lib/include/fwts_version.h
>   echo '#define FWTS_DATE    "'`date --utc "+%F %T"`'"' >> src/lib/include/fwts_version.h
> +# Update snapcraft version
> +oldsnap_version=$(grep "version: " snapcraft.yaml | cut -d' ' -f2)
> +sed -i "s/version: ${oldsnap_version}/version: ${version}/" snapcraft.yaml
> +# Update git repo
>   git add src/lib/include/fwts_version.h
> +git add snapcraft.yaml
>   git commit -s -m"lib: fwts_version.h - update to $version"
>   git tag -m'"Version '$1'"' $1
> 


Acked-by: Alex Hung <alex.hung at canonical.com>



More information about the fwts-devel mailing list