-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
packages source: fix new version addition to redirect list #1563
Conversation
…t version For example, this script output .htaccess as below when we release PGroonga 3.0.3. Redirect /source/pgroonga/pgroonga-3.0.0.tar.gz https://github.com/pgroonga/pgroonga/releases/download/3.0.0/pgroonga-3.0.0.tar.gz Redirect /source/pgroonga/pgroonga-3.0.0.tar.gz.asc https://github.com/pgroonga/pgroonga/releases/download/3.0.0/pgroonga-3.0.0.tar.gz.asc Redirect /source/pgroonga/pgroonga-3.0.0.zip https://github.com/pgroonga/pgroonga/releases/download/3.0.0/pgroonga-3.0.0.zip Redirect /source/pgroonga/pgroonga-3.0.0.zip.asc https://github.com/pgroonga/pgroonga/releases/download/3.0.0/pgroonga-3.0.0.zip.asc Redirect /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
Hmm... It's too overkill... I think that the following changes are enough: diff --git a/packages/packages-groonga-org-package-task.rb b/packages/packages-groonga-org-package-task.rb
index fbe0cdfe7..50b364b4c 100644
--- a/packages/packages-groonga-org-package-task.rb
+++ b/packages/packages-groonga-org-package-task.rb
@@ -263,7 +263,6 @@ class PackagesGroongaOrgPackageTask < PackageTask
"#{repository_rsync_base_path}/#{target_namespace}/#{@package}/"
sh("rsync",
"-av",
- "--dry-run",
"--include=.htaccess",
"--exclude=*",
rsync_dir,
@@ -285,7 +284,7 @@ class PackagesGroongaOrgPackageTask < PackageTask
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) |
Oh... Your modification output ".htaccess" as below.
I think that redirect target is only a source of 3.0.3 in the above definition. May be, I still don't understand this problem yet... |
Outside script like Homebrew is dependent on these links so we should keep all these versions links. |
How did you confirm this? You can confirm this by the following command line: (cd packages && GROONGA_REPOSITORY=/path/to/groonga rake source:download source:prepare && cat source/repositories/source/pgroonga/.htaccess) |
I confirm it as below.
I don't execute |
I confirm result of the following command.
"Redirect" definitions of a new version were added in existing "Redirect" definitions and rewrited latest version as below. Definitions of 3.0.0,
I'll fix my modification in according to #1563 (comment). |
They are problem of the existing |
…he latest version" This reverts commit d6b59e6. Because this modification too overkill.
Thanks! |
For example, this script output .htaccess as below when we release PGroonga 3.0.3.