[Groonga-commit] droonga/droonga.org at ee4d574 [gh-pages] Update release task for new version information mechanism

Back to archive index

Kouhei Sutou null+****@clear*****
Mon Nov 16 16:13:05 JST 2015


Kouhei Sutou	2015-11-16 16:13:05 +0900 (Mon, 16 Nov 2015)

  New Revision: ee4d57490380294cdaf72f917ac749483d699cd4
  https://github.com/droonga/droonga.org/commit/ee4d57490380294cdaf72f917ac749483d699cd4

  Message:
    Update release task for new version information mechanism

  Modified files:
    Rakefile

  Modified: Rakefile (+10 -7)
===================================================================
--- Rakefile    2015-11-16 16:08:17 +0900 (674a232)
+++ Rakefile    2015-11-16 16:13:05 +0900 (4dfab98)
@@ -65,25 +65,28 @@ end
 
 desc "Release a new version"
 task :release do
-  new_version = env_value("NEW_VERSION")
+  next_version = env_value("NEXT_VERSION")
   config_yaml_path = Pathname.new("_config.yml")
   config_yaml_data = config_yaml_path.read
   config = YAML.load(config_yaml_data)
-  current_version = config["droonga_version"]
+  version = config["version"]
+  current_version = version["current"]
 
   targets = []
   targets.concat(Pathname.glob("_po/*/{tutorial,reference}/"))
   targets.concat(Pathname.glob("{tutorial,reference}/"))
   targets.each do |target|
-    new_dir = target + new_version
+    next_dir = target + next_version
     current_dir = target + current_version
     next unless current_dir.exist?
-    rm_rf(new_dir)
-    cp_r(current_dir, new_dir)
+    rm_rf(next_dir)
+    cp_r(current_dir, next_dir)
   end
 
-  new_config = config.merge("droonga_version" => new_version)
+  version["olds"].unshift(current_version)
+  version["current"] = version["next"]
+  version["next"] = next_version
   config_yaml_path.open("w") do |config_yaml|
-    config_yaml.print(new_config.to_yaml)
+    config_yaml.print(config.to_yaml)
   end
 end
-------------- next part --------------
HTML����������������������������...
下載 



More information about the Groonga-commit mailing list
Back to archive index