[Groonga-commit] ranguba/chupa-text-docker at ee8f4b0 [master] Add release task

アーカイブの一覧に戻る
Kouhei Sutou null+****@clear*****
Thu Mar 28 17:26:41 JST 2019


Kouhei Sutou	2019-03-28 17:26:41 +0900 (Thu, 28 Mar 2019)

  Revision: ee8f4b0ee986d85a5f7a10973b269a4dc662e3e8
  https://github.com/ranguba/chupa-text-docker/commit/ee8f4b0ee986d85a5f7a10973b269a4dc662e3e8

  Message:
    Add release task

  Added files:
    Rakefile
  Modified files:
    chupa-text/Dockerfile

  Added: Rakefile (+33 -0) 100644
===================================================================
--- /dev/null
+++ Rakefile    2019-03-28 17:26:41 +0900 (bc130c9)
@@ -0,0 +1,33 @@
+# -*- ruby -*-
+
+version_key = "CHUPA_TEXT_DOCKER_VERSION"
+dockerfile_path = "chupa-text/Dockerfile"
+dockerfile_content = File.read(dockerfile_path)
+/#{version_key}=(.+?)$/ =~ dockerfile_content
+version = $1
+
+namespace :version do
+  desc "Bump version"
+  task :bump do
+    new_version = ENV["VERSION"]
+    raise "No ENV['VERSION']" if new_version.nil?
+    new_dockerfile_content =
+      dockerfile_content
+        .gsub(/#{version_key}=.+?$/,
+              "#{version_key}=#{new_version}")
+    File.open(dockerfile_path, "w") do |dockerfile|
+      dockerfile.print(new_dockerfile_content)
+    end
+  end
+end
+
+desc "Tag #{version}"
+task :tag do
+  sh("git", "tag",
+     "-a", version,
+     "-m", "#{version} has been released!!!")
+  sh("git", "push", "--tags")
+end
+
+desc "Release #{version}"
+task :release => :tag

  Modified: chupa-text/Dockerfile (+1 -1)
===================================================================
--- chupa-text/Dockerfile    2019-03-25 19:01:04 +0900 (16fb479)
+++ chupa-text/Dockerfile    2019-03-28 17:26:41 +0900 (51154b2)
@@ -63,7 +63,7 @@ ENV \
   RAILS_ENV=production \
   PATH=/var/lib/gems/2.5.0/bin:$PATH
 
-ENV LOCAL_CHUPA_TEXT_REVISION_FOR_UPDATE_DOCKER=4
+ENV CHUPA_TEXT_DOCKER_VERSION=2019.03.28.1
 RUN git clone --depth 1 https://github.com/ranguba/chupa-text-http-server.git
 
 COPY \
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20190328/96486341/attachment-0001.html>


More information about the Groonga-commit mailing list
アーカイブの一覧に戻る