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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9a38b68b938b1d5d96996c2e0271cdff8e914600b8d134e39a0717aa8290bca7
4
- data.tar.gz: 0451f17fefb476958074c0c11e37a4c0a020b8b4e6bf3fa352296369326a7925
3
+ metadata.gz: 67d289224a384dc9f1546799c15b1bf69649060d49ff8018869b098924104704
4
+ data.tar.gz: 4307158e1472c2aeafbab424fbb1d2af50a1a1cc6a43b2b11ea6dfae5e3b1d42
5
5
  SHA512:
6
- metadata.gz: 9f3e92a83c2ead4ed47136253c730cfd5f47938f490de04b2d48df91a7673a3b4ac08e4eda0d951fa83dab3215b544e8f060d68b4285dd9f042323267a08cd5c
7
- data.tar.gz: 899dfd47d6cefc53f87a72ca53ddda721bcf9c55ef019236b12a26bd56def82b5665c26958c5e8444a5168023ee49d0a51d17a632ac44e5db3f61861cb9518b7
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
 
@@ -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 deployment_mode?
387
+ if version_remote_mode?
380
388
  print_remote_version_status
381
389
  else
382
390
  puts(VERSION)
@@ -1,3 +1,3 @@
1
1
  module KamalBackup
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kamal-backup
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - crmne