heroku_tool 0.6.0 → 0.7.0

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: d583a0c0a64809e90e737fb8e7b34ab77a9c5b3968446dc86356862682046461
4
- data.tar.gz: a85666dc5b19f695c781ecd895566224e41b00258a90c493d1f1e76c6b21fbbf
3
+ metadata.gz: fb6fda0ba05eaa4e6ad534b88fb880943a586bee4e0bf19d2b9864d64d22962a
4
+ data.tar.gz: bf0cc2beeb2e9a2a907524cdd48e1100fc1836ce7101f1ee99a33a0a5cc0b322
5
5
  SHA512:
6
- metadata.gz: 1dc0606e0918d4f734a775d23cd1449017c2b86a46b5338c134ee25ff17947be53241a4830f00eaa1e60a2940e8ec38c1dbda27ca84afeb8eaefb2fb1199c99b
7
- data.tar.gz: 816b5157dd116a0db0ae1de5cc166765c0384aeb9df77b5280076c992ef120acaf6eb48a087363777adea6084ca657199f7a740200afa04eb093af89880a9ccc
6
+ metadata.gz: 85ecdd609434d8fb379143b8f1c59636f5bac40a73cd07bcf6f12e4f2cce0aa6b6a6e4eb03094c20d6663c65ad9425fbd37ce65c5914c12935cc9b32dc67d022
7
+ data.tar.gz: 1f51ca1c605876d3df6e669647bf6344001f6a99a61ec7bb1a8da0682aec7d8759fa5df3d48d925965e8014764b523b276d8fbd6105d92cd80f893cb060da530
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## v0.7.0
4
+
5
+ Skip requiring users to set Heroku::Configuration.app_revision_env_var (typically COMMIT_HASH or a APP_REVISION).
6
+ Skip setting this if you don't specify it.
7
+ Skip setting this if you specify it as HEROKU_SLUG_COMMIT (see https://devcenter.heroku.com/articles/dyno-metadata)
8
+
3
9
  ## v0.6.0
4
10
 
5
11
  Don't do unecessary restart after changing environment variables.
@@ -21,7 +21,7 @@ class Heroku < Thor
21
21
  end
22
22
 
23
23
  def app_revision_env_var
24
- raise "choose between APP_REVISION and COMMIT_HASH"
24
+ # alternatively if you want you can set this as APP_REVISION (for app-signal) or HEROKU_SLUG_COMMIT (see https://devcenter.heroku.com/articles/dyno-metadata)
25
25
  end
26
26
 
27
27
  def before_deploying(_instance, target, version, description: nil)
@@ -198,7 +198,12 @@ class Heroku < Thor
198
198
  puts_and_system "heroku run rake db:migrate -a #{implied_target.heroku_app}"
199
199
  end
200
200
 
201
- puts_and_system %{heroku config:set #{Heroku::Configuration.app_revision_env_var}=$(git describe --always #{deploy_ref}) -a #{implied_target.heroku_app}}
201
+
202
+ app_revision_env_var = Heroku::Configuration.app_revision_env_var
203
+ if app_revision_env_var && app_revision_env_var != "HEROKU_SLUG_COMMIT"
204
+ # HEROKU_SLUG_COMMIT is automatically set by https://devcenter.heroku.com/articles/dyno-metadata
205
+ puts_and_system %{heroku config:set #{app_revision_env_var}=$(git describe --always #{deploy_ref}) -a #{implied_target.heroku_app}}
206
+ end
202
207
 
203
208
  maintenance_off if maintenance
204
209
  set_message(target_name, nil)
@@ -305,6 +310,10 @@ class Heroku < Thor
305
310
  desc "list_deployed TARGET (DEPLOY_REF)", "list what would be deployed to TARGET (optionally specify deploy_ref)"
306
311
 
307
312
  def list_deployed(target_name, deploy_ref = nil)
313
+ if Heroku::Configuration.app_revision_env_var.nil?
314
+ puts "Can't list deployed as Heroku::Configuration.app_revision_env_var is not set"
315
+ return
316
+ end
308
317
  self.implied_target = lookup_heroku(target_name)
309
318
  deploy_ref = check_deploy_ref(deploy_ref)
310
319
  puts "------------------------------"
@@ -1,3 +1,3 @@
1
1
  module HerokuTool
2
- VERSION = "0.6.0"
2
+ VERSION = "0.7.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: heroku_tool
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Diggins
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-10-11 00:00:00.000000000 Z
11
+ date: 2024-02-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -142,7 +142,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
142
142
  - !ruby/object:Gem::Version
143
143
  version: '0'
144
144
  requirements: []
145
- rubygems_version: 3.1.6
145
+ rubygems_version: 3.2.33
146
146
  signing_key:
147
147
  specification_version: 4
148
148
  summary: Tool for configurable one-shot deployment and db managment with heroku and