WARNING: This server is unstable and will be retired in the next days. If you want to keep this forum available, please request immediately a migration on the Nabble Support forum. Forums that don't receive any migration request will be deleted forever.

Release task

View: New views
7 Messages — Rating Filter:   Alert me  

Release task

by hgiraud :: Rate this Message:

| View Threaded | Show Only this Message

Hi,

I have the following "problems" with the release task.

The repo_url is defined like this :

      def repo_url
        svn('info').scan(/URL: (.*)/)[0][0]
      end

On my system, "svn info" gives me "URL : http://..." : there is a space
after "URL".
A better regexp could be : /URL\s?: (.*)/


Next, our commit messages have a special format (we start with
keywords), and
we cannot use the buildr release without modifications.
I can patch the Release class in my buildfile, but perhaps something
similar to
the release attribute in buildr 1.3.3 would be possible, like in the
following exemple ?

Release.tag_name = lambda { |ver| "foo-#{ver}" }
Release.commit_format = lambda { |msg| "ADD: #{msg}" }


Last point, it seems there is a problem with the 1.5.x version of the
svn client.
I'm using the command line svn client (1.5.4), and the scn.copy does not
work.

I think this message explains it :
http://www.nabble.com/Error-when-creating-tags-from-working-copy-td19913357.html
I did what they recommend, and it worked when I modify the "tag_release"
method and I do a update just before the copy :

      def tag_release
        version = extract_version
        info "Tagging release #{version}"
        url = tag_url Svn.repo_url, version
        Svn.remove url, 'Removing old copy' rescue nil
        Svn.svn 'update' # BUG here in 1.5.x ?
        Svn.copy Dir.pwd, url, "Release #{version}"
      end


Re: Release task

by Alex Boisvert-3 :: Rate this Message:

| View Threaded | Show Only this Message

On Tue, Dec 9, 2008 at 2:36 AM, Hervé Giraud <hgiraud@...> wrote:

> I have the following "problems" with the release task.
>
> The repo_url is defined like this :
>
>     def repo_url
>       svn('info').scan(/URL: (.*)/)[0][0]
>     end
>
> On my system, "svn info" gives me "URL : http://..." : there is a space
> after "URL".
> A better regexp could be : /URL\s?: (.*)/


For reference, could you provide the output of "svn -version"  and "svn
info" ?

Next, our commit messages have a special format (we start with keywords),
> and
> we cannot use the buildr release without modifications.
> I can patch the Release class in my buildfile, but perhaps something
> similar to
> the release attribute in buildr 1.3.3 would be possible, like in the
> following exemple ?
>
> Release.tag_name = lambda { |ver| "foo-#{ver}" }
> Release.commit_format = lambda { |msg| "ADD: #{msg}" }


I think this would be a welcome enhancement.   Do you want to submit a
patch?

Last point, it seems there is a problem with the 1.5.x version of the svn
> client.
> I'm using the command line svn client (1.5.4), and the scn.copy does not
> work.
>
> I think this message explains it :
> http://www.nabble.com/Error-when-creating-tags-from-working-copy-td19913357.html
> I did what they recommend, and it worked when I modify the "tag_release"
> method and I do a update just before the copy


I'm not sure if you're just sharing this information, or asking if this
should become standard in Buildr.  It seems like a bug on Subversion's side
and doing a "svn update" before tagging, as opposed to earlier in the build
process, seems to be wrong... It creates a race condition and I wouldn't
want to tag different content than what was used during the release.

alex

Re: Release task

by Alexis Midon :: Rate this Message:

| View Threaded | Show Only this Message

Alexis


On Tue, Dec 9, 2008 at 8:00 AM, Alex Boisvert <boisvert@...> wrote:

> On Tue, Dec 9, 2008 at 2:36 AM, Hervé Giraud <hgiraud@...> wrote:
>
> > I have the following "problems" with the release task.
> >
> > The repo_url is defined like this :
> >
> >     def repo_url
> >       svn('info').scan(/URL: (.*)/)[0][0]
> >     end
> >
> > On my system, "svn info" gives me "URL : http://..." : there is a space
> > after "URL".
> > A better regexp could be : /URL\s?: (.*)/
>
>
> For reference, could you provide the output of "svn -version"  and "svn
> info" ?
>
> Next, our commit messages have a special format (we start with keywords),
> > and
> > we cannot use the buildr release without modifications.
> > I can patch the Release class in my buildfile, but perhaps something
> > similar to
> > the release attribute in buildr 1.3.3 would be possible, like in the
> > following exemple ?
> >
> > Release.tag_name = lambda { |ver| "foo-#{ver}" }
> > Release.commit_format = lambda { |msg| "ADD: #{msg}" }
>
>
> I think this would be a welcome enhancement.   Do you want to submit a
> patch?
>

yep, this could be easily added along with BUILDR-222.
I could provide a patch, the iron is still hot.

https://issues.apache.org/jira/browse/BUILDR-222

>
> Last point, it seems there is a problem with the 1.5.x version of the svn
> > client.
> > I'm using the command line svn client (1.5.4), and the scn.copy does not
> > work.
> >
> > I think this message explains it :
> >
> http://www.nabble.com/Error-when-creating-tags-from-working-copy-td19913357.html
> > I did what they recommend, and it worked when I modify the "tag_release"
> > method and I do a update just before the copy
>
>
> I'm not sure if you're just sharing this information, or asking if this
> should become standard in Buildr.  It seems like a bug on Subversion's side
> and doing a "svn update" before tagging, as opposed to earlier in the build
> process, seems to be wrong... It creates a race condition and I wouldn't
> want to tag different content than what was used during the release.
>
> alex
>

Re: Release task

by Alexis Midon :: Rate this Message:

| View Threaded | Show Only this Message

On Tue, Dec 9, 2008 at 2:36 AM, Hervé Giraud <hgiraud@...> wrote:

> Hi,
>
> I have the following "problems" with the release task.
>
> The repo_url is defined like this :
>
>     def repo_url
>       svn('info').scan(/URL: (.*)/)[0][0]
>     end
>
> On my system, "svn info" gives me "URL : http://..." : there is a space
> after "URL".
> A better regexp could be : /URL\s?: (.*)/
>
>
> Next, our commit messages have a special format (we start with keywords),
> and
> we cannot use the buildr release without modifications.
> I can patch the Release class in my buildfile, but perhaps something
> similar to
> the release attribute in buildr 1.3.3 would be possible, like in the
> following exemple ?
>
> Release.tag_name = lambda { |ver| "foo-#{ver}" }
> Release.commit_format = lambda { |msg| "ADD: #{msg}" }


Jira created https://issues.apache.org/jira/browse/BUILDR-223
Patch included in BUILDR-222


>
>
>
> Last point, it seems there is a problem with the 1.5.x version of the svn
> client.
> I'm using the command line svn client (1.5.4), and the scn.copy does not
> work.
>
> I think this message explains it :
> http://www.nabble.com/Error-when-creating-tags-from-working-copy-td19913357.html
> I did what they recommend, and it worked when I modify the "tag_release"
> method and I do a update just before the copy :
>
>     def tag_release
>       version = extract_version
>       info "Tagging release #{version}"
>       url = tag_url Svn.repo_url, version
>       Svn.remove url, 'Removing old copy' rescue nil
>       Svn.svn 'update' # BUG here in 1.5.x ?
>       Svn.copy Dir.pwd, url, "Release #{version}"
>     end
>
>

Parent Message unknown Re: Release task

by hgiraud :: Rate this Message:

| View Threaded | Show Only this Message

Hi

Alex Boisvert a écrit :

> On Tue, Dec 9, 2008 at 2:36 AM, Herv� Giraud <hgiraud@...> wrote:
>
> > I have the following "problems" with the release task.
> >
> > The repo_url is defined like this :
> >
> >     def repo_url
> >       svn('info').scan(/URL: (.*)/)[0][0]
> >     end
> >
> > On my system, "svn info" gives me "URL : http://..." : there is a space
> > after "URL".
> > A better regexp could be : /URL\s?: (.*)/
>
>
> For reference, could you provide the output of "svn -version"  and "svn
> info" ?
>  
I have a french version of Windows XP (I know, never a good idea not
using english version).
I'm using Msys or dos.

svn, version 1.5.4 (r33841)
    compilé Oct 24 2008, 15:51:42

$ svn info
Chemin : .
URL : https://...
Racine du dépôt : https://...
UUID du dépôt : bb6581bd-5aa3-46da-a306-7108957c620c
Révision : 208
Type de noeud : répertoire
Tâche programmée : normale
Auteur de la dernière modification : ...
Révision de la dernière modification : 206
Date de la dernière modification: 2008-12-09 10:00:24 +0100 (mar. 09
déc. 2008)

> Next, our commit messages have a special format (we start with keywords),
> > and
> > we cannot use the buildr release without modifications.
> > I can patch the Release class in my buildfile, but perhaps something
> > similar to
> > the release attribute in buildr 1.3.3 would be possible, like in the
> > following exemple ?
> >
> > Release.tag_name = lambda { |ver| "foo-#{ver}" }
> > Release.commit_format = lambda { |msg| "ADD: #{msg}" }
>
>
> I think this would be a welcome enhancement.   Do you want to submit a
> patch?
>  
Awesome, somebody did it already !! Thank you.

> Last point, it seems there is a problem with the 1.5.x version of the svn
> > client.
> > I'm using the command line svn client (1.5.4), and the scn.copy does not
> > work.
> >
> > I think this message explains it :
> > http://www.nabble.com/Error-when-creating-tags-from-working-copy-td19913357.html
> > I did what they recommend, and it worked when I modify the "tag_release"
> > method and I do a update just before the copy
>
>
> I'm not sure if you're just sharing this information, or asking if this
> should become standard in Buildr.  It seems like a bug on Subversion's side
> and doing a "svn update" before tagging, as opposed to earlier in the build
> process, seems to be wrong... It creates a race condition and I wouldn't
> want to tag different content than what was used during the release.
>
> alex
>  
Sorry if I'm not clear : I'm just sharing this info because I wasn't
aware of it.
You're right it's a bug in svn but it's the only way I know today if I
wan't to use the release task (of course, nobody should do a commit
during this release).

Herve


Re: Release task

by Alex Boisvert-3 :: Rate this Message:

| View Threaded | Show Only this Message

On Wed, Dec 10, 2008 at 3:24 AM, Hervé Giraud <hgiraud@...> wrote:

> Alex Boisvert a écrit :
>
>> On Tue, Dec 9, 2008 at 2:36 AM, Herv� Giraud <hgiraud@...> wrote:
>>
>> > I have the following "problems" with the release task.
>> >
>> > The repo_url is defined like this :
>> >
>> >     def repo_url
>> >       svn('info').scan(/URL: (.*)/)[0][0]
>> >     end
>> >
>> > On my system, "svn info" gives me "URL : http://..." : there is a space
>> > after "URL".
>> > A better regexp could be : /URL\s?: (.*)/
>>
>>
>> For reference, could you provide the output of "svn -version"  and "svn
>> info" ?
>>
>>
> I have a french version of Windows XP (I know, never a good idea not using
> english version).
> I'm using Msys or dos.
>
> svn, version 1.5.4 (r33841)
>   compilé Oct 24 2008, 15:51:42
>
> $ svn info
> Chemin : .
> URL : https://...
> Racine du dépôt : https://...
> UUID du dépôt : bb6581bd-5aa3-46da-a306-7108957c620c
> Révision : 208
> Type de noeud : répertoire
> Tâche programmée : normale
> Auteur de la dernière modification : ...
> Révision de la dernière modification : 206
> Date de la dernière modification: 2008-12-09 10:00:24 +0100 (mar. 09 déc.
> 2008)


I think this makes a good case for using "svn info --xml" instead of the
human-readable output so we are not subject to any localization differences
between versions.

I've created https://issues.apache.org/jira/browse/BUILDR-226

alex

Re: Release task

by Alexis Midon :: Rate this Message:

| View Threaded | Show Only this Message

On Wed, Dec 10, 2008 at 3:24 AM, Hervé Giraud <hgiraud@...> wrote:

> Hi
>
> Alex Boisvert a écrit :
>
>> On Tue, Dec 9, 2008 at 2:36 AM, Herv� Giraud <hgiraud@...> wrote:
>>
>> > I have the following "problems" with the release task.
>> >
>> > The repo_url is defined like this :
>> >
>> >     def repo_url
>> >       svn('info').scan(/URL: (.*)/)[0][0]
>> >     end
>> >
>> > On my system, "svn info" gives me "URL : http://..." : there is a space
>> > after "URL".
>> > A better regexp could be : /URL\s?: (.*)/
>>
>>
>> For reference, could you provide the output of "svn -version"  and "svn
>> info" ?
>>
>>
> I have a french version of Windows XP (I know, never a good idea not using
> english version).



mais quelle idee aussi!.. ;)


>
> I'm using Msys or dos.
>
> svn, version 1.5.4 (r33841)
>   compilé Oct 24 2008, 15:51:42
>
> $ svn info
> Chemin : .
> URL : https://...
> Racine du dépôt : https://...
> UUID du dépôt : bb6581bd-5aa3-46da-a306-7108957c620c
> Révision : 208
> Type de noeud : répertoire
> Tâche programmée : normale
> Auteur de la dernière modification : ...
> Révision de la dernière modification : 206
> Date de la dernière modification: 2008-12-09 10:00:24 +0100 (mar. 09 déc.
> 2008)
>
>> Next, our commit messages have a special format (we start with keywords),
>> > and
>> > we cannot use the buildr release without modifications.
>> > I can patch the Release class in my buildfile, but perhaps something
>> > similar to
>> > the release attribute in buildr 1.3.3 would be possible, like in the
>> > following exemple ?
>> >
>> > Release.tag_name = lambda { |ver| "foo-#{ver}" }
>> > Release.commit_format = lambda { |msg| "ADD: #{msg}" }
>>
>>
>> I think this would be a welcome enhancement.   Do you want to submit a
>> patch?
>>
>>
> Awesome, somebody did it already !! Thank you.
>
>> Last point, it seems there is a problem with the 1.5.x version of the svn
>> > client.
>> > I'm using the command line svn client (1.5.4), and the scn.copy does not
>> > work.
>> >
>> > I think this message explains it :
>> >
>> http://www.nabble.com/Error-when-creating-tags-from-working-copy-td19913357.html
>> > I did what they recommend, and it worked when I modify the "tag_release"
>> > method and I do a update just before the copy
>>
>>
>> I'm not sure if you're just sharing this information, or asking if this
>> should become standard in Buildr.  It seems like a bug on Subversion's
>> side
>> and doing a "svn update" before tagging, as opposed to earlier in the
>> build
>> process, seems to be wrong... It creates a race condition and I wouldn't
>> want to tag different content than what was used during the release.
>>
>> alex
>>
>>
> Sorry if I'm not clear : I'm just sharing this info because I wasn't aware
> of it.
> You're right it's a bug in svn but it's the only way I know today if I
> wan't to use the release task (of course, nobody should do a commit during
> this release).
>
> Herve
>
>