From 25bb03ac2e658489ce1f40db40a0a7feb4b62b5b Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Fri, 26 Aug 2016 14:59:00 -0600 Subject: [PATCH] Fix Rake jsondoc:tag task Add support for new tag format google-cloud-datastore:v1.2.0. --- Rakefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Rakefile b/Rakefile index da42134462c0..d5d33bcc749f 100644 --- a/Rakefile +++ b/Rakefile @@ -181,7 +181,7 @@ task :jsondoc, :bundleupdate do |t, args| end namespace :jsondoc do - # @param tag [String] A valid tag, e.g. "v0.10.0", or "master". + # @param tag [String] A valid tag, e.g. "v0.10.0" (legacy), "google-cloud-datastore:v1.2.0", or "master". desc "Clones gh-pages branch to a temp dir" task :init, :tag do |t, args| tag = args[:tag] @@ -213,7 +213,8 @@ namespace :jsondoc do unless Dir.exist? gh_pages + "json/#{gem}" mkdir_p gh_pages + "json/#{gem}", verbose: true end - cp_r "#{gem}/jsondoc", gh_pages + "json/#{gem}/#{tag}", verbose: true + gem_version = tag.include?(":") ? tag.split(":").last : tag + cp_r "#{gem}/jsondoc", gh_pages + "json/#{gem}/#{gem_version}", verbose: true end cp "docs/manifest.json", gh_pages, verbose: true cp "docs/json/home.html", gh_pages + "json", verbose: true