     end
   end
 
-  defp archive(path, version_string) do
+  defp archive([path: path, build_number: build_number, commit: sha]) do
+    short_sha = String.slice(sha, 0..6)
+    version_string =  "#{today}-#{build_number}-#{short_sha}"
+
     if File.exists?(Path.join([path, 'bin', 'archive'])) do
       IO.puts("running archive")
       output = Porcelain.shell("cd #{path} && ./bin/archive")

      end
      output.status
    else
      archive_path = Path.join(System.tmp_dir(), "#{version_string}.tgz")
      System.cmd("tar", ["--dereference", "-czf", archive_path, path])
      System.cmd("mv", [archive_path, path])
      IO.puts("created #{version_string}.tgz")
      {:ok, nil}
    end
  end

  defp valid?(opts) do

    end
  end

  defp create_build_info(path, build_number, sha) do
    short_sha = String.slice(sha, 0..6)
    version_string =  "#{today}-#{build_number}-#{short_sha}"

    build_info_template = ~s"""
    ---
    version: #{version_string}
