dev@javaserverfaces.java.net

Re: Improvement of the changebundle generation script

From: Manuel Bernhardt <bernhardt.manuel_at_gmail.com>
Date: Wed, 22 Sep 2010 20:32:31 +0200

Hi,

On Wed, Sep 22, 2010 at 7:10 PM, Jason Lee <jason_at_steeplesoft.com> wrote:
>  That works for me, but how about .cb-excludes.txt so that it's a hidden
> file like the .svn files?

sure, though I thought that this could also come in handy when wanting
to exclude other files that shouldn't be part of the changebundle but
are locally modified nonetheless (e.g. because they contain some debug
comments etc.)

Manuel

On Wed, Sep 22, 2010 at 7:10 PM, Jason Lee <jason_at_steeplesoft.com> wrote:
>  That works for me, but how about .cb-excludes.txt so that it's a hidden
> file like the .svn files?
>
> On 9/22/10 11:21 AM, Manuel Bernhardt wrote:
>>
>> Hi,
>>
>> I'm a bit annoyed by having to edit the generated changebundle.txt by
>> hand after each generation and remove e.g. the modified IDE files.
>>
>> Here's a patch that allows to exclude specific files by adding them in
>> a "cb-excludes.txt" file at the root of the project. I tested this on
>> linux and os x. For windows though there's a need to tweak the .bat
>> script, but I guess this is a start.
>> Note that this will only work if the cb-excludes.txt file exists (so
>> it would need to be there by default, I for now added some Idea files
>> that got modified on my machine).
>>
>> Manuel
>>
>>
>> SECTION: Modified Files
>> ----------------------------
>> M       common/ant/bin/cb.sh
>>
>> A       cb-excludes.txt
>>
>>
>> SECTION: Diffs
>> ----------------------------
>> Index: common/ant/bin/cb.sh
>> ===================================================================
>> --- common/ant/bin/cb.sh        (revision 8615)
>> +++ common/ant/bin/cb.sh        (working copy)
>> @@ -43,12 +43,13 @@
>>
>>  FILE=/tmp/lmtxt
>>  CB=$PWD/changebundle.txt
>> +EXCLUDES=$PWD/cb-excludes.txt
>>  DIFF=/tmp/diff.txt
>>  ZIP=newfiles.zip
>>
>>  echo "Scanning for modifications..."
>>
>> -svn status>  $FILE 2>&1
>> +svn status | grep -v -f $EXCLUDES>  $FILE 2>&1
>>
>>  modifiedFiles=`grep ^"M " $FILE`
>>  addedFiles=`grep ^"A " $FILE`
>> @@ -93,7 +94,7 @@
>>      if [ -n "$modifiedFiles" ]; then
>>          echo "SECTION: Diffs">>  $CB
>>          echo "----------------------------">>  $CB
>> -        svn diff>  $DIFF
>> +        svn diff `grep ^"M " $FILE | cut -c8-`>  $DIFF
>>          grep -v ^\? $DIFF>>  $CB
>>      fi
>>
>> Index: cb-excludes.txt
>> ===================================================================
>> --- cb-excludes.txt     (revision 0)
>> +++ cb-excludes.txt     (revision 0)
>> @@ -0,0 +1,4 @@
>> +Mojarra-2.0.ipr
>> +Mojarra-2.0.iws
>> +jsf-ri/impl.iml
>> +jsf-demo/demo.iml
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_javaserverfaces.dev.java.net
>> For additional commands, e-mail: dev-help_at_javaserverfaces.dev.java.net
>>
>
>
> --
> Jason Lee
> Senior Member of Technical Staff at Oracle
> http://blogs.steeplesoft.com
>
>