Skip to content
Permalink
Browse files

Add script for creating release candidate builds

  • Loading branch information...
ConnorRigby committed Jul 3, 2019
1 parent a38deaa commit 60c079d1781e89ea1f5986a430a11c39b4db87bf
Showing with 12 additions and 0 deletions.
  1. +12 −0 scripts/release_candidate.exs
@@ -0,0 +1,12 @@
#!/usr/bin/env elixir
{_, 0} = System.cmd("git", ["checkout", "staging"], into: IO.stream(:stdio, :line))
{_, 0} = System.cmd("git", ["fetch", "--all"], into: IO.stream(:stdio, :line))
{_, 0} = System.cmd("git", ["reset", "--hard", "origin/staging"], into: IO.stream(:stdio, :line))
version = File.read!("VERSION") |> Version.parse!()
[<<"rc", rc :: binary>>] = version.pre
version = %{version | pre: ["rc#{String.to_integer(rc) + 1}"]}
:ok = File.write!("VERSION", to_string(version))
{_, 0} = System.cmd("git", ["add", "VERSION"], into: IO.stream(:stdio, :line))
{_, 0} = System.cmd("git", ["commit", "-am", "Release v#{version}"], into: IO.stream(:stdio, :line))
{_, 0} = System.cmd("git", ["tag", "v#{version}"], into: IO.stream(:stdio, :line))
{_, 0} = System.cmd("git", ["push", "origin", "staging", "v#{version}"], into: IO.stream(:stdio, :line))

0 comments on commit 60c079d

Please sign in to comment.
You can’t perform that action at this time.