Skip to content

Commit

Permalink
packages source: fix new version addition to redirect list (groonga#1563
Browse files Browse the repository at this point in the history
)

For example, this script output .htaccess as below when we release
PGroonga 3.0.3.

```
edirect /source/pgroonga/pgroonga-3.0.1.tar.gz https://github.com/pgroonga/pgroonga/releases/download/3.0.1/pgroonga-3.0.1.tar.gz
Redirect /source/pgroonga/pgroonga-3.0.1.tar.gz.asc https://github.com/pgroonga/pgroonga/releases/download/3.0.1/pgroonga-3.0.1.tar.gz.asc
Redirect /source/pgroonga/pgroonga-3.0.1.zip https://github.com/pgroonga/pgroonga/releases/download/3.0.1/pgroonga-3.0.1.zip 
Redirect /source/pgroonga/pgroonga-3.0.1.zip.asc https://github.com/pgroonga/pgroonga/releases/download/3.0.1/pgroonga-3.0.1.zip.asc
Redirect /source/pgroonga/pgroonga-3.0.2.tar.gz https://github.com/pgroonga/pgroonga/releases/download/3.0.2/pgroonga-3.0.2.tar.gz
Redirect /source/pgroonga/pgroonga-3.0.2.tar.gz.asc https://github.com/pgroonga/pgroonga/releases/download/3.0.2/pgroonga-3.0.2.tar.gz.asc
Redirect /source/pgroonga/pgroonga-3.0.2.zip https://github.com/pgroonga/pgroonga/releases/download/3.0.2/pgroonga-3.0.2.zip 
Redirect /source/pgroonga/pgroonga-3.0.2.zip.asc https://github.com/pgroonga/pgroonga/releases/download/3.0.2/pgroonga-3.0.2.zip.asc
Redirect /source/pgroonga/pgroonga-3.0.3.tar.gz https://github.com/pgroonga/pgroonga/releases/download/3.0.3/pgroonga-3.0.3.tar.gz
Redirect /source/pgroonga/pgroonga-3.0.3.tar.gz.asc https://github.com/pgroonga/pgroonga/releases/download/3.0.3/pgroonga-3.0.3.tar.gz.asc
Redirect /source/pgroonga/pgroonga-latest.tar.gz https://github.com/pgroonga/pgroonga/releases/download/3.0.3/pgroonga-3.0.3.tar.gz
Redirect /source/pgroonga/pgroonga-latest.tar.gz.asc https://github.com/pgroonga/pgroonga/releases/download/3.0.3/pgroonga-3.0.3.tar.gz.asc
Redirect /source/pgroonga/pgroonga-3.0.3.zip https://github.com/pgroonga/pgroonga/releases/download/3.0.3/pgroonga-3.0.3.zip 
Redirect /source/pgroonga/pgroonga-3.0.3.zip.asc https://github.com/pgroonga/pgroonga/releases/download/3.0.3/pgroonga-3.0.3.zip.asc
Redirect /source/pgroonga/pgroonga-latest.zip https://github.com/pgroonga/pgroonga/releases/download/3.0.3/pgroonga-3.0.3.zip 
Redirect /source/pgroonga/pgroonga-latest.zip.asc https://github.com/pgroonga/pgroonga/releases/download/3.0.3/pgroonga-3.0.3.zip.asc
```
  • Loading branch information
komainu8 authored May 18, 2023
1 parent ceecf85 commit b00cc61
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/packages-groonga-org-package-task.rb
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,6 @@ def download_packages(target_namespace)
"#{repository_rsync_base_path}/#{target_namespace}/#{@package}/"
sh("rsync",
"-av",
"--dry-run",
"--include=.htaccess",
"--exclude=*",
rsync_dir,
Expand All @@ -285,7 +284,7 @@ def prepare(target_namespace)
end
File.open(htaccess_path, "w") do |htaccess|
htaccess_content.each_line do |line|
htaccess.puts(line) unless line.include?("-latest-")
htaccess.puts(line) unless line.include?("-latest")
end
__send__("#{target_namespace}_targets").each do |target|
redirect_url = built_package_url(target_namespace, target)
Expand Down

0 comments on commit b00cc61

Please sign in to comment.