Repository: buildr Updated Branches: refs/heads/master 9f23748c1 -> e006009c1
Revert "remove more SVN old tasks which are not required anymore" We do need SVN access for the site, specifically. This reverts commit e697855848d99e66758dcbf3fa5c09d2c49bca90. Project: http://git-wip-us.apache.org/repos/asf/buildr/repo Commit: http://git-wip-us.apache.org/repos/asf/buildr/commit/e006009c Tree: http://git-wip-us.apache.org/repos/asf/buildr/tree/e006009c Diff: http://git-wip-us.apache.org/repos/asf/buildr/diff/e006009c Branch: refs/heads/master Commit: e006009c18d23465da804acf4222592d8ab2119b Parents: 9f23748 Author: Antoine Toulme <[email protected]> Authored: Tue Mar 29 10:53:24 2016 -0700 Committer: Antoine Toulme <[email protected]> Committed: Tue Mar 29 10:56:14 2016 -0700 ---------------------------------------------------------------------- rakelib/doc.rake | 22 ++++++++++++++++++++-- rakelib/release.rake | 9 +++++---- 2 files changed, 25 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/buildr/blob/e006009c/rakelib/doc.rake ---------------------------------------------------------------------- diff --git a/rakelib/doc.rake b/rakelib/doc.rake index 0cb611a..e090c30 100644 --- a/rakelib/doc.rake +++ b/rakelib/doc.rake @@ -91,7 +91,7 @@ end # Publish prerequisites to Web site. desc "Publish complete web site" -task 'publish' => %w(site) do +task 'publish' => %w(site setup-local-site-svn) do puts "Uploading new site ..." sh 'rsync', '--progress', '--recursive', '--delete', '--exclude=.svn','_site/', 'site' task('publish-site-svn').invoke @@ -100,13 +100,31 @@ end # Update HTML + PDF documentation (but not rdoc, changelog etc.) desc "Publish non-release specific documentation to web site" -task 'publish-doc' => %w(buildr.pdf _site) do +task 'publish-doc' => %w(buildr.pdf _site setup-local-site-svn) do cp 'buildr.pdf', '_site' puts 'Uploading new site ...' sh 'rsync', '--progress', '--recursive', '_site/', 'site' # Note: no --delete + task('publish-site-svn').invoke puts 'Done' end +task 'publish-site-svn' do + cd 'site' + sh 'svn', 'add', '--force', '.' + cd '..' + sh 'svn', 'commit', 'site', '-m', 'Publish latest site' +end + +desc 'Checkout or update site to local directory' +task 'setup-local-site-svn' do + if File.exist?('site') + sh 'svn', 'up', 'site' + sh 'svn', 'revert', '--recursive', 'site' + else + sh 'svn', 'co', 'https://svn.apache.org/repos/asf/buildr/site', 'site' + end +end + rescue Exception => e # The doc tasks do not work on our CI infrastructure with jruby as the native libraries # are not compatible with version of the C++ library we are running there http://git-wip-us.apache.org/repos/asf/buildr/blob/e006009c/rakelib/release.rake ---------------------------------------------------------------------- diff --git a/rakelib/release.rake b/rakelib/release.rake index 19cbb8e..91e369f 100644 --- a/rakelib/release.rake +++ b/rakelib/release.rake @@ -13,15 +13,16 @@ # License for the specific language governing permissions and limitations under # the License. - desc 'Release the next version of buildr from existing staged repository' -task 'release' do +task 'release' do |task, args| + user = args.user || ENV['user'] || `whoami` + # First, we need to get all the staged files from Apache to _release. mkpath '_release' lambda do - url = "people.apache.org:~/public_html/#{spec.name}/#{spec.version}" + url = "home.apache.org:~/public_html/#{spec.name}/#{spec.version}" puts "Populating _release directory from #{url} ..." - sh 'rsync', '--progress', '--recursive', url, '_release' + sh "lftp -e \"mirror public_html/#{spec.name}/#{spec.version} _release/#{spec.version}; bye\" -u #{user} sftp://home.apache.org" puts '[X] Staged files are now in _release' end.call
