* configure: pull the version number from Bazaar
@ 2011-10-20 3:38 Michael Hope
2011-10-20 21:51 ` Yann E. MORIN
0 siblings, 1 reply; 5+ messages in thread
From: Michael Hope @ 2011-10-20 3:38 UTC (permalink / raw)
To: Yann E. MORIN; +Cc: crossgcc
If '.version' ends with bzr then use bzr to automatically add the
revision number to the version string.
Mirrors the current support for Mercurial. Uses Debian style versions
with a '+' to indicate after.
.version will normally contain '1.12.4+bzr'. CT_VERSION will end up
as '1.12.4+bzr1234'. If the revno can't be found fall back to a
Debian style date such as '1.12.4+bzr+20111009'.
Linaro does most of its work in Launchpad and Bazaar. I'm happy to
keep this as a local patch if need be.
Signed-off-by: Michael Hope <michael.hope@linaro.org>
diff --git a/configure b/configure
index 6a68b38..0e7d23e 100755
--- a/configure
+++ b/configure
@@ -550,6 +550,16 @@
# arbitrarily deep directory structure
VERSION="$( printf "${VERSION}\n" |"${sed}" -r -e 's|/+|_|g;' )"
;;
+ *bzr)
+ REVISION="$( bzr revno 2>/dev/null || true )"
+ case "${REVISION}" in
+ "")
+ VERSION="${VERSION}+$( date +%Y%m%d.%H%M%S )";;
+ *)
+ VERSION="${VERSION}${REVISION}";
+ ;;
+ esac
+ ;;
esac
printf "${VERSION}\n"
--
For unsubscribe information see http://sourceware.org/lists.html#faq
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: configure: pull the version number from Bazaar
2011-10-20 3:38 configure: pull the version number from Bazaar Michael Hope
@ 2011-10-20 21:51 ` Yann E. MORIN
2011-10-20 22:13 ` Michael Hope
2011-11-02 0:03 ` Yann E. MORIN
0 siblings, 2 replies; 5+ messages in thread
From: Yann E. MORIN @ 2011-10-20 21:51 UTC (permalink / raw)
To: crossgcc; +Cc: Michael Hope
Michael, All,
On Thursday 20 October 2011 05:38:13 Michael Hope wrote:
> If '.version' ends with bzr then use bzr to automatically add the
> revision number to the version string.
NAK.
The official repository is using Mercurial, and only that will be
supported upstream.
> Linaro does most of its work in Launchpad and Bazaar. I'm happy to
> keep this as a local patch if need be.
I believe that part of the code will not really change in the forseeable
future, so this should be easy to maintain.
Sorry, that won't go in. :-(
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
--
For unsubscribe information see http://sourceware.org/lists.html#faq
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: configure: pull the version number from Bazaar
2011-10-20 21:51 ` Yann E. MORIN
@ 2011-10-20 22:13 ` Michael Hope
2011-11-02 0:03 ` Yann E. MORIN
1 sibling, 0 replies; 5+ messages in thread
From: Michael Hope @ 2011-10-20 22:13 UTC (permalink / raw)
To: Yann E. MORIN; +Cc: crossgcc
On Fri, Oct 21, 2011 at 10:51 AM, Yann E. MORIN
<yann.morin.1998@anciens.enib.fr> wrote:
> Michael, All,
>
> On Thursday 20 October 2011 05:38:13 Michael Hope wrote:
>> If '.version' ends with bzr then use bzr to automatically add the
>> revision number to the version string.
>
> NAK.
>
> The official repository is using Mercurial, and only that will be
> supported upstream.
>
>> Linaro does most of its work in Launchpad and Bazaar. I'm happy to
>> keep this as a local patch if need be.
>
> I believe that part of the code will not really change in the forseeable
> future, so this should be easy to maintain.
>
> Sorry, that won't go in. :-(
No worries. The more code upstream, the more you'd have to test.
-- Michael
--
For unsubscribe information see http://sourceware.org/lists.html#faq
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: configure: pull the version number from Bazaar
2011-10-20 21:51 ` Yann E. MORIN
2011-10-20 22:13 ` Michael Hope
@ 2011-11-02 0:03 ` Yann E. MORIN
2011-11-09 0:43 ` Michael Hope
1 sibling, 1 reply; 5+ messages in thread
From: Yann E. MORIN @ 2011-11-02 0:03 UTC (permalink / raw)
To: crossgcc; +Cc: Michael Hope, Thomas Petazzoni
Michael, Thomas, All,
On Thursday 20 October 2011 23:51:32 Yann E. MORIN wrote:
> On Thursday 20 October 2011 05:38:13 Michael Hope wrote:
> > If '.version' ends with bzr then use bzr to automatically add the
> > revision number to the version string.
> The official repository is using Mercurial, and only that will be
> supported upstream.
During the Prague events last week, a suggestion was made (by Thomas)
regarding this issue:
- ./configure checks if a script is present
- ./configure runs the script
- the script is expected to output a single line, using whatever
is deemed fit to compute a VCS version
- ./configure appends the line above to the version it internally
computed
That way, it is easy to add such a script to the different VCSes used by
the different users, without the need to always port the change to the
./configure script, and without the change always trying to escape up
to upstream. ;-)
What do you think? Would that be OK with you? With others?
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
--
For unsubscribe information see http://sourceware.org/lists.html#faq
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: configure: pull the version number from Bazaar
2011-11-02 0:03 ` Yann E. MORIN
@ 2011-11-09 0:43 ` Michael Hope
0 siblings, 0 replies; 5+ messages in thread
From: Michael Hope @ 2011-11-09 0:43 UTC (permalink / raw)
To: Yann E. MORIN; +Cc: crossgcc, Thomas Petazzoni
On Wed, Nov 2, 2011 at 1:02 PM, Yann E. MORIN
<yann.morin.1998@anciens.enib.fr> wrote:
> Michael, Thomas, All,
>
> On Thursday 20 October 2011 23:51:32 Yann E. MORIN wrote:
>> On Thursday 20 October 2011 05:38:13 Michael Hope wrote:
>> > If '.version' ends with bzr then use bzr to automatically add the
>> > revision number to the version string.
>> The official repository is using Mercurial, and only that will be
>> supported upstream.
>
> During the Prague events last week, a suggestion was made (by Thomas)
> regarding this issue:
> - ./configure checks if a script is present
> - ./configure runs the script
> - the script is expected to output a single line, using whatever
> is deemed fit to compute a VCS version
> - ./configure appends the line above to the version it internally
> computed
>
> That way, it is easy to add such a script to the different VCSes used by
> the different users, without the need to always port the change to the
> ./configure script, and without the change always trying to escape up
> to upstream. ;-)
>
> What do you think? Would that be OK with you? With others?
That would work. Something like a 'version.sh' that returns the whole
version string to allow for arbitrary formatting.
Along the lines of:
version=`cat .version`
if [ -x version.sh ]; then version=`./version.sh $version`
else if version ends with hg; then version=$version + `hg revno`
I'll see about sending a patch.
-- Michael
--
For unsubscribe information see http://sourceware.org/lists.html#faq
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-11-09 0:43 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-20 3:38 configure: pull the version number from Bazaar Michael Hope
2011-10-20 21:51 ` Yann E. MORIN
2011-10-20 22:13 ` Michael Hope
2011-11-02 0:03 ` Yann E. MORIN
2011-11-09 0:43 ` Michael Hope
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).