kamal-backup 0.1.1 → 0.1.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/README.md +1 -1
- data/lib/kamal_backup/cli.rb +9 -1
- data/lib/kamal_backup/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: 67d289224a384dc9f1546799c15b1bf69649060d49ff8018869b098924104704
|
|
4
|
+
data.tar.gz: 4307158e1472c2aeafbab424fbb1d2af50a1a1cc6a43b2b11ea6dfae5e3b1d42
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cba47d9ebf7771e7513e24ca6e7c1d30c5bc3660caeb6ab0f4ed945203baadf370778af5b887a7eb39a82664709f9210179c847c1983d29318befe03abe0e8fa
|
|
7
|
+
data.tar.gz: ff55565395d49eca645732276db416aa2f240b7511468f7d96296821c776937404862835ba977bd7005efba7ea91fb2269f7e7b0f7f4db7e751cb1b375da9ea2
|
data/README.md
CHANGED
|
@@ -145,7 +145,7 @@ kamal-backup version
|
|
|
145
145
|
|
|
146
146
|
Production-side commands shell out through Kamal when you pass `-d` or `-c`. Local commands run on your machine.
|
|
147
147
|
|
|
148
|
-
Remote-backed commands require the local gem version and the backup accessory version to match. If they drift, `kamal-backup` fails fast and tells you to reboot the accessory so it pulls the current `latest` image. `version` is the diagnostic exception: it shows both versions and the sync status
|
|
148
|
+
Remote-backed commands require the local gem version and the backup accessory version to match. If they drift, `kamal-backup` fails fast and tells you to reboot the accessory so it pulls the current `latest` image. `version` is the diagnostic exception: from an app checkout with `config/deploy.yml`, it shows both versions and the sync status even without `-d`.
|
|
149
149
|
|
|
150
150
|
Common examples:
|
|
151
151
|
|
data/lib/kamal_backup/cli.rb
CHANGED
|
@@ -50,6 +50,14 @@ module KamalBackup
|
|
|
50
50
|
!options[:destination].to_s.strip.empty? || !options[:config_file].to_s.strip.empty?
|
|
51
51
|
end
|
|
52
52
|
|
|
53
|
+
def default_deploy_config?
|
|
54
|
+
File.file?(File.expand_path(KamalBridge::DEFAULT_CONFIG_FILE))
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
def version_remote_mode?
|
|
58
|
+
deployment_mode? || default_deploy_config?
|
|
59
|
+
end
|
|
60
|
+
|
|
53
61
|
def accessory_name
|
|
54
62
|
@accessory_name ||= bridge.accessory_name(preferred: local_preferences.accessory_name)
|
|
55
63
|
end
|
|
@@ -376,7 +384,7 @@ module KamalBackup
|
|
|
376
384
|
|
|
377
385
|
desc "version", "Print the running kamal-backup version"
|
|
378
386
|
def version
|
|
379
|
-
if
|
|
387
|
+
if version_remote_mode?
|
|
380
388
|
print_remote_version_status
|
|
381
389
|
else
|
|
382
390
|
puts(VERSION)
|
data/lib/kamal_backup/version.rb
CHANGED