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 +4 -4
- data/CHANGELOG.md +5 -1
- data/lib/master_to_main/cli.rb +12 -2
- data/lib/master_to_main/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6a64928607b005c31d0d4ad4e01994c12733d5744bd75d72fcf9e3d58279be81
|
4
|
+
data.tar.gz: 2b72700b70c3d2f07ca291e3b18e0d147fbf1e4ae5636ba124af0d522bed8db1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76c82db75d6c0157219f6700bebdf6b81d48e3a0954da7ebde4e31c051282e463935e4d3c377a37dc2424ffd909a5e7757c1e106256ec4bf8bce87da1e229a46
|
7
|
+
data.tar.gz: 6af1841e036951b0f8a2f8ed37e4477d7f8d9ffda9b99a93b121de43e215a32567f36488256f2d6696ca183ffac142278e59e7842817724fecc7330c1e3c29fd
|
data/CHANGELOG.md
CHANGED
data/lib/master_to_main/cli.rb
CHANGED
@@ -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
|
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
|