Sha256: b0df3481b0d38f47f4ac264878e44ccb7ca8164a7e2d2ce12f1a45f2466a17f2
Contents?: true
Size: 454 Bytes
Versions: 14
Compression:
Stored size: 454 Bytes
Contents
require 'bake/modernize' def git update(root: Dir.pwd) end def update(root:) if current_branch != "main" # https://github.com/github/renaming system("git", "branch", "-M", "main") system("git", "push", "-u", "origin", "main") end end private def current_branch require 'open3' output, status = Open3.capture2("git", "branch", "--show-current") unless status.success? raise "Could not get current branch!" end return output end
Version data entries
14 entries across 14 versions & 1 rubygems