branch_db 0.1.3 → 0.1.4
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 +6 -0
- data/README.md +6 -2
- data/lib/branch_db/tasks/branch_db.rake +4 -4
- data/lib/branch_db/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: 9161a1c2f0b77819a5081474320b61fe4e67f40cdfedeb827aa0ec1ccd90271c
|
|
4
|
+
data.tar.gz: c12ccfb6e4934a1d04e6b8fd33f22e323983426d1b90a41c0708c8b5891cf2fe
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3cc42e63a336cf1ce931d3df4e864f8e07b635d25614442d4a74123d254d377ab76d80c6926885d1a0307647230bd846e7f49abc4a61748385bb0c099f3f7dc1
|
|
7
|
+
data.tar.gz: 6713fd11a7353164c9a65546ba6a04aa92a8c779fe7bea2d8bc16daef10d8feb057dcd716da8964206a8c9ddcdd76977292f6051cc5007477e6b576e363cf922
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
|
@@ -155,8 +155,8 @@ RAILS_ENV=test rails db:prepare
|
|
|
155
155
|
|---------|-------------|
|
|
156
156
|
| `rails db:prepare` | Rails' standard command, enhanced with cloning from parent/main |
|
|
157
157
|
| `rails db:branch:list` | List all branch databases |
|
|
158
|
-
| `rails db:branch:purge` | Remove all branch databases except current and main |
|
|
159
|
-
| `rails db:branch:prune` | Remove databases for branches that no longer exist in git |
|
|
158
|
+
| `rails db:branch:purge` | Remove all branch databases except current and main. Use `FORCE=1` to skip confirmation. |
|
|
159
|
+
| `rails db:branch:prune` | Remove databases for branches that no longer exist in git. Use `FORCE=1` to skip confirmation. |
|
|
160
160
|
|
|
161
161
|
### Examples
|
|
162
162
|
|
|
@@ -185,6 +185,10 @@ rails db:branch:prune
|
|
|
185
185
|
# => - myapp_development_merged_feature
|
|
186
186
|
# => - myapp_test_merged_feature
|
|
187
187
|
# => Proceed with deletion? [y/N]
|
|
188
|
+
|
|
189
|
+
# Skip confirmation prompt (useful for CI/scripts)
|
|
190
|
+
FORCE=1 rails db:branch:purge
|
|
191
|
+
FORCE=1 rails db:branch:prune
|
|
188
192
|
```
|
|
189
193
|
|
|
190
194
|
## How It Works
|
|
@@ -9,14 +9,14 @@ namespace :db do
|
|
|
9
9
|
db_configs.each { cleaner_for(_1).list_branch_databases }
|
|
10
10
|
end
|
|
11
11
|
|
|
12
|
-
desc "Remove all branch databases (keeps main and current branch)"
|
|
12
|
+
desc "Remove all branch databases (keeps main and current branch). Set FORCE=1 to skip confirmation."
|
|
13
13
|
task purge: :environment do
|
|
14
|
-
db_configs.each { cleaner_for(_1).purge }
|
|
14
|
+
db_configs.each { cleaner_for(_1).purge(confirm: ENV["FORCE"] != "1") }
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
-
desc "Remove databases for branches that no longer exist in git"
|
|
17
|
+
desc "Remove databases for branches that no longer exist in git. Set FORCE=1 to skip confirmation."
|
|
18
18
|
task prune: :environment do
|
|
19
|
-
db_configs.each { cleaner_for(_1).prune }
|
|
19
|
+
db_configs.each { cleaner_for(_1).prune(confirm: ENV["FORCE"] != "1") }
|
|
20
20
|
end
|
|
21
21
|
|
|
22
22
|
desc "Ensure branch database exists (used by db:prepare enhancement)"
|
data/lib/branch_db/version.rb
CHANGED