Skip to content

Commit

Permalink
hwloc: add latest_release.txt near latest_snapshop.txt
Browse files Browse the repository at this point in the history
Some people want the latest release version number, not including
release candidates.

Refs Homebrew/homebrew-core#151735

Signed-off-by: Brice Goglin <[email protected]>
  • Loading branch information
bgoglin committed Oct 19, 2023
1 parent 504f187 commit 1202993
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ Deny from 180.211.180.14
# With build artifacts in S3, latest_snapshot.txt is a
# PHP script that generates the right answer, so turn
# on PHP processing for those files.
<Files "latest_snapshot.txt">
<FilesMatch "^latest_(snapshot|release).txt$">
AddHandler application/x-httpd-php .txt
</Files>
</FilesMatch>

## Comment these rules in if you want to have nice URLs using
## $conf['rewrite'] = 1 - not needed for rewrite mode 2
Expand Down Expand Up @@ -81,12 +81,14 @@ RewriteRule nightly/(.*)/(latest_snapshot\.txt|.*\.tar\.gz|.*\.tar\.bz2) https:/

# Redirect requests for release artifacts to download.open-mpi.org
RewriteCond %{REQUEST_URI} !latest_snapshot.txt$ [NC]
RewriteCond %{REQUEST_URI} !latest_release.txt$ [NC]
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/cpanel-dcv/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule software/ompi/(.*)/downloads/(.*) https://download.open-mpi.org/release/open-mpi/$1/$2 [L,R=301]

RewriteCond %{REQUEST_URI} !latest_snapshot.txt$ [NC]
RewriteCond %{REQUEST_URI} !latest_release.txt$ [NC]
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/cpanel-dcv/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
Expand Down
8 changes: 8 additions & 0 deletions software/hwloc/current/downloads/latest_release.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php

$topdir = "../../../..";
include_once("../version.inc");
include_once("$topdir/includes/downloads.inc");

latest_snapshot_output("hwloc", $s3_prefix, [], $releases);
?>
8 changes: 8 additions & 0 deletions software/hwloc/v2.9/downloads/latest_release.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php

$topdir = "../../../..";
include_once("../version.inc");
include_once("$topdir/includes/downloads.inc");

latest_snapshot_output("hwloc", $s3_prefix, [], $releases);
?>

0 comments on commit 1202993

Please sign in to comment.