Sha256: 1408b603bd430e6eda27b3a0a1f40a36ccad1c9e7e9a2466e9cb4d91cff925ae
Contents?: true
Size: 527 Bytes
Versions: 1
Compression:
Stored size: 527 Bytes
Contents
# Released under the MIT License. # Copyright, 2021, by Samuel Williams. 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
bake-modernize-0.13.0 | bake/modernize/git.rb |