master_to_main 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 71e3451ce977f600d84510976915b39c28d18a68596b2a9118731fde10d9d4d9
4
- data.tar.gz: 9b73f2ec8d863bf86fa4b763f07fddd662676a351f17c5d845767c61bca05a6c
3
+ metadata.gz: 6a64928607b005c31d0d4ad4e01994c12733d5744bd75d72fcf9e3d58279be81
4
+ data.tar.gz: 2b72700b70c3d2f07ca291e3b18e0d147fbf1e4ae5636ba124af0d522bed8db1
5
5
  SHA512:
6
- metadata.gz: 34ef7eab028716de82af81e41154ea9e4a0cc963c720c84d9aae6e2118391357e411e6c796d12c8fbce514ada5d145f18575fe0f79c5b76c108a12e60c98453a
7
- data.tar.gz: bffc48a13f395255bc403bb8c0270007bd997edd2afd2dede41668bf86387fe7166edd29021785789526b6ba43ff4ed7d5bba1c60fc9ea4b1493900bb3a95e78
6
+ metadata.gz: 76c82db75d6c0157219f6700bebdf6b81d48e3a0954da7ebde4e31c051282e463935e4d3c377a37dc2424ffd909a5e7757c1e106256ec4bf8bce87da1e229a46
7
+ data.tar.gz: 6af1841e036951b0f8a2f8ed37e4477d7f8d9ffda9b99a93b121de43e215a32567f36488256f2d6696ca183ffac142278e59e7842817724fecc7330c1e3c29fd
@@ -1,3 +1,7 @@
1
1
  # 0.0.1 - 2020-06-17
2
2
 
3
- Initiale release for testing
3
+ Fix checkout of local branch, add local master branch deletion
4
+
5
+ # 0.0.1 - 2020-06-17
6
+
7
+ Initial release for testing
@@ -11,14 +11,15 @@ module MasterToMain
11
11
  def github
12
12
 
13
13
  prompt_info
14
-
15
14
  create_client
15
+
16
16
  ensure_old_branch_exists
17
17
  ensure_new_branch_exists
18
18
  clone_branch_protections
19
19
  change_default_branch
20
20
  rebase_pull_requests
21
21
  change_origin
22
+ delete_local_old_branch
22
23
  end
23
24
 
24
25
  desc "update_local", "point local clone to new branch"
@@ -140,11 +141,20 @@ module MasterToMain
140
141
 
141
142
  def change_origin
142
143
  if yes?("Would you like to change origin to point to #{@repo.new_branch}?")
143
- `git push -u origin master`
144
+ `git checkout #{@repo.new_branch}`
145
+ `git push -u origin #{@repo.new_branch}`
144
146
  else
145
147
  say "Be sure to change your local `origin` setting"
146
148
  end
147
149
  end
150
+
151
+ def delete_local_old_branch
152
+ `git branch -D #{@repo.old_branch}` if yes?("Would you like to delete your local #{@repo.old_branch} branch?")
153
+
154
+ say "----------------"
155
+ say "In order to ensure no builds or deployments break, please delete your remote #{@repo.old_branch} on github", :green
156
+ say "----------------"
157
+ end
148
158
  end
149
159
  end
150
160
  end
@@ -1,3 +1,3 @@
1
1
  module MasterToMain
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: master_to_main
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - John DeWyze