Re: [Shorewall-devel] [RFC PATCH 2/3] Take into account that publish use current dir

2018-05-17 Thread Tom Eastep
On 05/17/2018 08:51 AM, Matt Darfeuille wrote:
> On 5/17/2018 5:30 PM, Tom Eastep wrote:
>> On 05/17/2018 07:26 AM, Matt Darfeuille wrote:
>>> On 5/16/2018 8:32 PM, Matt Darfeuille wrote:
 On 5/16/2018 6:12 PM, Tom Eastep wrote:
> On 05/14/2018 04:17 AM, Matt Darfeuille wrote:
>> Signed-off-by: Matt Darfeuille 
>> ---
>>  build/release | 8 ++--
>>  1 file changed, 6 insertions(+), 2 deletions(-)
>>
>> diff --git a/build/release b/build/release
>> index 7d059868..942c522f 100755
>> --- a/build/release
>> +++ b/build/release
>> @@ -325,8 +325,6 @@ case $VERSION in
>>  ;;
>>  esac
>>  
>> -[ -f "$WEBDIR/index.html" -a -f "$TOOLSDIR/web/publish" ] && 
>> $TOOLSDIR/web/publish index.html
>> -
>>  if [ -z "$GIT_CODE_OBJECT" -a -z "$GIT_RELEASE_OBJECT" ]; then
>>  create_tag $GIT
>>  create_tag $GITRELEASEDIR
>> @@ -356,3 +354,9 @@ for repo in $REPOSITORIES; do
>>  push_command_func $GIT $repo master
>>  push_command_func $GITRELEASEDIR $repo master
>>  done
>> +
>> +cd $WEBDIR
>> +
>> +[ -f "$WEBDIR/index.html" -a -f "$TOOLSDIR/web/publish" ] && 
>> $TOOLSDIR/web/publish index.html
>> +
>> +cd ..
>>
>
> Hi Matt,
>
> This doesn't work. It will leave the CWD as ~/shorewall/, but 'upload'
> assumes that the CWD is ~/shorewall/build/$BASEVERSION.. I always run
> 'release' in that directory. That is why I recommended using pushd and 
> popd.
>

 Would the following patch do the trick?
 I'd rather not go the pushd and popd way! :)

>>>
>>> Tom, the last sent patch (Allow release script to work outside of build
>>> dir) is maybe more useful then "Move back in base directory after
>>> publishing"?
>>>
>>> Or am I still missing something?
>>>
>>
>> Matt,
>>
>> The upload script must be run out of ~/shorewall/build/$BASEVERSION.
>>
>> So that patch needs to be tweaked to say
>>
>> cd $BUILD_DIR/$BASEVERSION
>>
> 
> Sorry about that, corrected patch sent.
> 

Good -- I think I'm happy with the changes now.

Thanks Matt,

-Tom
-- 
Tom Eastep\   Q: What do you get when you cross a mobster with
Shoreline, \ an international standard?
Washington, USA \ A: Someone who makes you an offer you can't
http://shorewall.org \   understand
  \___



signature.asc
Description: OpenPGP digital signature
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Shorewall-devel mailing list
Shorewall-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/shorewall-devel


Re: [Shorewall-devel] [RFC PATCH 2/3] Take into account that publish use current dir

2018-05-17 Thread Matt Darfeuille
On 5/17/2018 5:30 PM, Tom Eastep wrote:
> On 05/17/2018 07:26 AM, Matt Darfeuille wrote:
>> On 5/16/2018 8:32 PM, Matt Darfeuille wrote:
>>> On 5/16/2018 6:12 PM, Tom Eastep wrote:
 On 05/14/2018 04:17 AM, Matt Darfeuille wrote:
> Signed-off-by: Matt Darfeuille 
> ---
>  build/release | 8 ++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/build/release b/build/release
> index 7d059868..942c522f 100755
> --- a/build/release
> +++ b/build/release
> @@ -325,8 +325,6 @@ case $VERSION in
>  ;;
>  esac
>  
> -[ -f "$WEBDIR/index.html" -a -f "$TOOLSDIR/web/publish" ] && 
> $TOOLSDIR/web/publish index.html
> -
>  if [ -z "$GIT_CODE_OBJECT" -a -z "$GIT_RELEASE_OBJECT" ]; then
>  create_tag $GIT
>  create_tag $GITRELEASEDIR
> @@ -356,3 +354,9 @@ for repo in $REPOSITORIES; do
>  push_command_func $GIT $repo master
>  push_command_func $GITRELEASEDIR $repo master
>  done
> +
> +cd $WEBDIR
> +
> +[ -f "$WEBDIR/index.html" -a -f "$TOOLSDIR/web/publish" ] && 
> $TOOLSDIR/web/publish index.html
> +
> +cd ..
>

 Hi Matt,

 This doesn't work. It will leave the CWD as ~/shorewall/, but 'upload'
 assumes that the CWD is ~/shorewall/build/$BASEVERSION.. I always run
 'release' in that directory. That is why I recommended using pushd and 
 popd.

>>>
>>> Would the following patch do the trick?
>>> I'd rather not go the pushd and popd way! :)
>>>
>>
>> Tom, the last sent patch (Allow release script to work outside of build
>> dir) is maybe more useful then "Move back in base directory after
>> publishing"?
>>
>> Or am I still missing something?
>>
> 
> Matt,
> 
> The upload script must be run out of ~/shorewall/build/$BASEVERSION.
> 
> So that patch needs to be tweaked to say
> 
> cd $BUILD_DIR/$BASEVERSION
> 

Sorry about that, corrected patch sent.

-Matt
-- 
Matt Darfeuille

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Shorewall-devel mailing list
Shorewall-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/shorewall-devel


Re: [Shorewall-devel] [RFC PATCH 2/3] Take into account that publish use current dir

2018-05-17 Thread Tom Eastep
On 05/17/2018 07:26 AM, Matt Darfeuille wrote:
> On 5/16/2018 8:32 PM, Matt Darfeuille wrote:
>> On 5/16/2018 6:12 PM, Tom Eastep wrote:
>>> On 05/14/2018 04:17 AM, Matt Darfeuille wrote:
 Signed-off-by: Matt Darfeuille 
 ---
  build/release | 8 ++--
  1 file changed, 6 insertions(+), 2 deletions(-)

 diff --git a/build/release b/build/release
 index 7d059868..942c522f 100755
 --- a/build/release
 +++ b/build/release
 @@ -325,8 +325,6 @@ case $VERSION in
  ;;
  esac
  
 -[ -f "$WEBDIR/index.html" -a -f "$TOOLSDIR/web/publish" ] && 
 $TOOLSDIR/web/publish index.html
 -
  if [ -z "$GIT_CODE_OBJECT" -a -z "$GIT_RELEASE_OBJECT" ]; then
  create_tag $GIT
  create_tag $GITRELEASEDIR
 @@ -356,3 +354,9 @@ for repo in $REPOSITORIES; do
  push_command_func $GIT $repo master
  push_command_func $GITRELEASEDIR $repo master
  done
 +
 +cd $WEBDIR
 +
 +[ -f "$WEBDIR/index.html" -a -f "$TOOLSDIR/web/publish" ] && 
 $TOOLSDIR/web/publish index.html
 +
 +cd ..

>>>
>>> Hi Matt,
>>>
>>> This doesn't work. It will leave the CWD as ~/shorewall/, but 'upload'
>>> assumes that the CWD is ~/shorewall/build/$BASEVERSION.. I always run
>>> 'release' in that directory. That is why I recommended using pushd and popd.
>>>
>>
>> Would the following patch do the trick?
>> I'd rather not go the pushd and popd way! :)
>>
> 
> Tom, the last sent patch (Allow release script to work outside of build
> dir) is maybe more useful then "Move back in base directory after
> publishing"?
> 
> Or am I still missing something?
> 

Matt,

The upload script must be run out of ~/shorewall/build/$BASEVERSION.

So that patch needs to be tweaked to say

cd $BUILD_DIR/$BASEVERSION

-Tom
-- 
Tom Eastep\   Q: What do you get when you cross a mobster with
Shoreline, \ an international standard?
Washington, USA \ A: Someone who makes you an offer you can't
http://shorewall.org \   understand
  \___



signature.asc
Description: OpenPGP digital signature
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Shorewall-devel mailing list
Shorewall-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/shorewall-devel


Re: [Shorewall-devel] [RFC PATCH 2/3] Take into account that publish use current dir

2018-05-17 Thread Matt Darfeuille
On 5/16/2018 8:32 PM, Matt Darfeuille wrote:
> On 5/16/2018 6:12 PM, Tom Eastep wrote:
>> On 05/14/2018 04:17 AM, Matt Darfeuille wrote:
>>> Signed-off-by: Matt Darfeuille 
>>> ---
>>>  build/release | 8 ++--
>>>  1 file changed, 6 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/build/release b/build/release
>>> index 7d059868..942c522f 100755
>>> --- a/build/release
>>> +++ b/build/release
>>> @@ -325,8 +325,6 @@ case $VERSION in
>>>  ;;
>>>  esac
>>>  
>>> -[ -f "$WEBDIR/index.html" -a -f "$TOOLSDIR/web/publish" ] && 
>>> $TOOLSDIR/web/publish index.html
>>> -
>>>  if [ -z "$GIT_CODE_OBJECT" -a -z "$GIT_RELEASE_OBJECT" ]; then
>>>  create_tag $GIT
>>>  create_tag $GITRELEASEDIR
>>> @@ -356,3 +354,9 @@ for repo in $REPOSITORIES; do
>>>  push_command_func $GIT $repo master
>>>  push_command_func $GITRELEASEDIR $repo master
>>>  done
>>> +
>>> +cd $WEBDIR
>>> +
>>> +[ -f "$WEBDIR/index.html" -a -f "$TOOLSDIR/web/publish" ] && 
>>> $TOOLSDIR/web/publish index.html
>>> +
>>> +cd ..
>>>
>>
>> Hi Matt,
>>
>> This doesn't work. It will leave the CWD as ~/shorewall/, but 'upload'
>> assumes that the CWD is ~/shorewall/build/$BASEVERSION.. I always run
>> 'release' in that directory. That is why I recommended using pushd and popd.
>>
> 
> Would the following patch do the trick?
> I'd rather not go the pushd and popd way! :)
> 

Tom, the last sent patch (Allow release script to work outside of build
dir) is maybe more useful then "Move back in base directory after
publishing"?

Or am I still missing something?

-Matt
-- 
Matt Darfeuille

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Shorewall-devel mailing list
Shorewall-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/shorewall-devel


Re: [Shorewall-devel] [RFC PATCH 2/3] Take into account that publish use current dir

2018-05-16 Thread Matt Darfeuille
On 5/16/2018 6:12 PM, Tom Eastep wrote:
> On 05/14/2018 04:17 AM, Matt Darfeuille wrote:
>> Signed-off-by: Matt Darfeuille 
>> ---
>>  build/release | 8 ++--
>>  1 file changed, 6 insertions(+), 2 deletions(-)
>>
>> diff --git a/build/release b/build/release
>> index 7d059868..942c522f 100755
>> --- a/build/release
>> +++ b/build/release
>> @@ -325,8 +325,6 @@ case $VERSION in
>>  ;;
>>  esac
>>  
>> -[ -f "$WEBDIR/index.html" -a -f "$TOOLSDIR/web/publish" ] && 
>> $TOOLSDIR/web/publish index.html
>> -
>>  if [ -z "$GIT_CODE_OBJECT" -a -z "$GIT_RELEASE_OBJECT" ]; then
>>  create_tag $GIT
>>  create_tag $GITRELEASEDIR
>> @@ -356,3 +354,9 @@ for repo in $REPOSITORIES; do
>>  push_command_func $GIT $repo master
>>  push_command_func $GITRELEASEDIR $repo master
>>  done
>> +
>> +cd $WEBDIR
>> +
>> +[ -f "$WEBDIR/index.html" -a -f "$TOOLSDIR/web/publish" ] && 
>> $TOOLSDIR/web/publish index.html
>> +
>> +cd ..
>>
> 
> Hi Matt,
> 
> This doesn't work. It will leave the CWD as ~/shorewall/, but 'upload'
> assumes that the CWD is ~/shorewall/build/$BASEVERSION.. I always run
> 'release' in that directory. That is why I recommended using pushd and popd.
> 

Would the following patch do the trick?
I'd rather not go the pushd and popd way! :)

> Alternatively, you could move the 'publish' command to the end of the
> script, with a comment that it must be last.
> 

Ok -- But the best way is to first push index.html then upload $BASEVERSION?
If yes, I'll rethink about the best way to do that!

-Matt
-- 
Matt Darfeuille

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Shorewall-devel mailing list
Shorewall-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/shorewall-devel


Re: [Shorewall-devel] [RFC PATCH 2/3] Take into account that publish use current dir

2018-05-16 Thread Tom Eastep
On 05/14/2018 04:17 AM, Matt Darfeuille wrote:
> Signed-off-by: Matt Darfeuille 
> ---
>  build/release | 8 ++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/build/release b/build/release
> index 7d059868..942c522f 100755
> --- a/build/release
> +++ b/build/release
> @@ -325,8 +325,6 @@ case $VERSION in
>  ;;
>  esac
>  
> -[ -f "$WEBDIR/index.html" -a -f "$TOOLSDIR/web/publish" ] && 
> $TOOLSDIR/web/publish index.html
> -
>  if [ -z "$GIT_CODE_OBJECT" -a -z "$GIT_RELEASE_OBJECT" ]; then
>  create_tag $GIT
>  create_tag $GITRELEASEDIR
> @@ -356,3 +354,9 @@ for repo in $REPOSITORIES; do
>  push_command_func $GIT $repo master
>  push_command_func $GITRELEASEDIR $repo master
>  done
> +
> +cd $WEBDIR
> +
> +[ -f "$WEBDIR/index.html" -a -f "$TOOLSDIR/web/publish" ] && 
> $TOOLSDIR/web/publish index.html
> +
> +cd ..
> 

Hi Matt,

This doesn't work. It will leave the CWD as ~/shorewall/, but 'upload'
assumes that the CWD is ~/shorewall/build/$BASEVERSION.. I always run
'release' in that directory. That is why I recommended using pushd and popd.

Alternatively, you could move the 'publish' command to the end of the
script, with a comment that it must be last.

Thanks,
-Tom
-- 
Tom Eastep\   Q: What do you get when you cross a mobster with
Shoreline, \ an international standard?
Washington, USA \ A: Someone who makes you an offer you can't
http://shorewall.org \   understand
  \___



signature.asc
Description: OpenPGP digital signature
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Shorewall-devel mailing list
Shorewall-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/shorewall-devel