-
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: download latest source archive in dist task #1451
Conversation
desc "Download the latest source archive" | ||
task :source do | ||
source_archive_url = built_package_url(nil, @archive_base_name) | ||
download(source_archive_url, "..") | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we rewrite define_archive_task
instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adressed. (Also changed the description of this PR.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to update title too.
packages/Rakefile
Outdated
source_archive_url = built_package_url(nil, @archive_base_name) | ||
download(source_archive_url, "..") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we write this here, this is always processed. (rake --help
also processes this.)
We should put this into file do ... end
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed. (I had misunderstand about file ... do ... end
... )
when we execute "cd packages && rake source", we download the latest source archive into the top of the repository.
7463eed
to
28536dc
Compare
Would you re-review this PR? |
How about this? diff --git a/packages/Rakefile b/packages/Rakefile
index bc7939453..7c5704cfc 100644
--- a/packages/Rakefile
+++ b/packages/Rakefile
@@ -42,9 +42,14 @@ class GroongaPackageTask < PackagesGroongaOrgPackageTask
end
def define_archive_task
- file @original_archive_name do
- File.symlink("../#{@original_archive_name}",
- @original_archive_name)
+ file "../#{@original_archive_name}" do
+ source_archive_url = built_package_url(:source, @archive_base_name)
+ download(source_archive_url, "..")
+ end
+
+ file @original_archive_name => "../#{@original_archive_name}" do
+ ln_s("../#{@original_archive_name}",
+ @original_archive_name)
end
end
|
Thanks, I have changed the code as you indicated, and it worked fine as far as I tested. |
By this change, we can download the latest source archive from the github release page into the top of the repository by executing "cd packages && rake dist".