Patchwork update_version.sh: Insert just date + time in date stamp

login
register
mail settings
Submitter Colin King
Date Feb. 22, 2013, 5:08 p.m.
Message ID <1361552896-1656-1-git-send-email-colin.king@canonical.com>
Download mbox | patch
Permalink /patch/222572/
State Accepted
Headers show

Comments

Colin King - Feb. 22, 2013, 5:08 p.m.
From: Colin Ian King <colin.king@canonical.com>

The update_version.sh script is inserting some international strings
into the FWTS_DATE string which is not was intended.  For example:

fwts -v
fwts, Version V0.26.05, 四 2月 7 09:14:47 CST 2013

..so alter this so we just dump the date and time as digits and
don't dump out the day or month strings.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 update_version.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Keng-Yu Lin - Feb. 26, 2013, 9 a.m.
On Sat, Feb 23, 2013 at 1:08 AM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The update_version.sh script is inserting some international strings
> into the FWTS_DATE string which is not was intended.  For example:
>
> fwts -v
> fwts, Version V0.26.05, 四 2月 7 09:14:47 CST 2013
>
> ..so alter this so we just dump the date and time as digits and
> don't dump out the day or month strings.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  update_version.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/update_version.sh b/update_version.sh
> index dae8141..2eefe10 100755
> --- a/update_version.sh
> +++ b/update_version.sh
> @@ -27,7 +27,7 @@ cat << EOF > src/lib/include/fwts_version.h
>   */
>  EOF
>  echo '#define FWTS_VERSION "'$version'"' >> src/lib/include/fwts_version.h
> -echo '#define FWTS_DATE    "'`date`'"' >> src/lib/include/fwts_version.h
> +echo '#define FWTS_DATE    "'`date "+%x %T"`'"' >> src/lib/include/fwts_version.h
>  git add src/lib/include/fwts_version.h
>  git commit -s -m"lib: fwts_version.h - update to $version"
>  git tag -m'"Version '$1'"' $1
> --
> 1.8.1.2
>

Thanks for fixing this. :-)

Acked-by: Keng-Yu Lin <kengyu@canonical.com>
Alex Hung - March 4, 2013, 8:35 a.m.
On 02/23/2013 01:08 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The update_version.sh script is inserting some international strings
> into the FWTS_DATE string which is not was intended.  For example:
>
> fwts -v
> fwts, Version V0.26.05, 四 2月 7 09:14:47 CST 2013
>
> ..so alter this so we just dump the date and time as digits and
> don't dump out the day or month strings.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   update_version.sh | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/update_version.sh b/update_version.sh
> index dae8141..2eefe10 100755
> --- a/update_version.sh
> +++ b/update_version.sh
> @@ -27,7 +27,7 @@ cat << EOF > src/lib/include/fwts_version.h
>    */
>   EOF
>   echo '#define FWTS_VERSION "'$version'"' >> src/lib/include/fwts_version.h
> -echo '#define FWTS_DATE    "'`date`'"' >> src/lib/include/fwts_version.h
> +echo '#define FWTS_DATE    "'`date "+%x %T"`'"' >> src/lib/include/fwts_version.h
>   git add src/lib/include/fwts_version.h
>   git commit -s -m"lib: fwts_version.h - update to $version"
>   git tag -m'"Version '$1'"' $1
>
Acked-by: Alex Hung <alex.hung@canonical.com>

Patch

diff --git a/update_version.sh b/update_version.sh
index dae8141..2eefe10 100755
--- a/update_version.sh
+++ b/update_version.sh
@@ -27,7 +27,7 @@  cat << EOF > src/lib/include/fwts_version.h
  */
 EOF
 echo '#define FWTS_VERSION "'$version'"' >> src/lib/include/fwts_version.h
-echo '#define FWTS_DATE    "'`date`'"' >> src/lib/include/fwts_version.h
+echo '#define FWTS_DATE    "'`date "+%x %T"`'"' >> src/lib/include/fwts_version.h
 git add src/lib/include/fwts_version.h
 git commit -s -m"lib: fwts_version.h - update to $version"
 git tag -m'"Version '$1'"' $1