Re: [PATCH] SCRIPTS: Create -LATEST symlink for each BRANCH

2020-03-09 Thread Tim Düsterhus
Willy,

Am 09.03.20 um 19:05 schrieb Willy Tarreau:
> Then why don't use use the snapshots, which already contain a LATEST link ?
> They're produced daily when there are changes, and they're even produced
> for stable branches if that's of any interest.
> 
>http://www.haproxy.org/download/2.2/src/snapshot/

for some reason I only saw the `-patches` tarball and missed / ignored
the `-ss` one. I guess that'll work for me, thanks.

Best regards
Tim Düsterhus



Re: [PATCH] SCRIPTS: Create -LATEST symlink for each BRANCH

2020-03-09 Thread Willy Tarreau
On Mon, Mar 09, 2020 at 06:00:42PM +0100, Tim Duesterhus wrote:
> Willy,
> 
> I wanted to add VTest tests to [haproxy-auth-request]. I'd like to test the
> Lua script with various HAProxy branches and ideally run the test with the
> latest patch version for each branch instead of hardcoding whatever was
> recent when writing the tests.
> 
> This does not appear to be easily possible right now, because there is no
> real machine readable way to obtain that information to the best of my
> knowledge.
> 
> With this new symlinks I can simply download the -LATEST tarball and call
> it a day.

Then why don't use use the snapshots, which already contain a LATEST link ?
They're produced daily when there are changes, and they're even produced
for stable branches if that's of any interest.

   http://www.haproxy.org/download/2.2/src/snapshot/

Willy



[PATCH] SCRIPTS: Create -LATEST symlink for each BRANCH

2020-03-09 Thread Tim Duesterhus
Willy,

I wanted to add VTest tests to [haproxy-auth-request]. I'd like to test the
Lua script with various HAProxy branches and ideally run the test with the
latest patch version for each branch instead of hardcoding whatever was
recent when writing the tests.

This does not appear to be easily possible right now, because there is no
real machine readable way to obtain that information to the best of my
knowledge.

With this new symlinks I can simply download the -LATEST tarball and call
it a day.

The changes have *NOT* been tested. If you pick this change I'd appreciate
if you could create the necessary symlinks for HAProxy 1.8+.

[haproxy-auth-request]: https://github.com/TimWolla/haproxy-auth-request

Best regards
Tim Düsterhus

Apply with `git am --scissors` to automatically cut the commit message.

-- >8 --
This allows scripts, such as continous integration pipelines to easily grab
the latest patch version of a specific branch.
---
 scripts/publish-release | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/scripts/publish-release b/scripts/publish-release
index 5a9a5cead..a353ba5d8 100755
--- a/scripts/publish-release
+++ b/scripts/publish-release
@@ -167,7 +167,10 @@ fi
 
 ( cd "$TARGET_DIR/src${DEVEL}" ; \
   md5sum haproxy-$NEW.tar.gz > haproxy-$NEW.tar.gz.md5 ; \
-  sha256sum haproxy-$NEW.tar.gz > haproxy-$NEW.tar.gz.sha256 )
+  sha256sum haproxy-$NEW.tar.gz > haproxy-$NEW.tar.gz.sha256 ; \
+  ln -fs haproxy-$NEW.tar.gz haproxy-${BRANCH}-LATEST.tar.gz ; \
+  ln -fs haproxy-$NEW.tar.gz.md5 haproxy-${BRANCH}-LATEST.tar.gz.md5 ; \
+  ln -fs haproxy-$NEW.tar.gz.sha256 haproxy-${BRANCH}-LATEST.tar.gz.sha256)
 
 echo "Extracting doc ..."
 git show "v$NEW:CHANGELOG" > "$TARGET_DIR/src/CHANGELOG"
@@ -179,6 +182,6 @@ done
 
 echo "Done : ls -l ${TARGET_DIR}"
 ( cd "$TARGET_DIR" ;
-  ls -l src/CHANGELOG "src${DEVEL}/haproxy-${NEW}".tar.gz{,.md5,.sha256} $(for 
i in "${DOC[@]}"; do echo "doc/${i#doc/}"{,.gz}; done)
+  ls -l src/CHANGELOG "src${DEVEL}/haproxy-${NEW}".tar.gz{,.md5,.sha256} 
"src${DEVEL}/haproxy-${BRANCH}-LATEST".tar.gz{,.md5,.sha256} $(for i in 
"${DOC[@]}"; do echo "doc/${i#doc/}"{,.gz}; done)
 )
 echo
-- 
2.25.1