selective-ruby-core 0.1.2-x86_64-linux → 0.1.3-x86_64-linux

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 14a8dd050ca8404ea8339e60ce70d6efe818729113d40b40773cc984846107e1
4
- data.tar.gz: 53e9f422e0f7fb10fd28c3469c07a5a34010148cc6a08ca0f6800230dc864f6d
3
+ metadata.gz: 61626d843514502b6ebb7bd829345d0a18bc76603fe7c2568838371321eeb3ae
4
+ data.tar.gz: 360dcffb94500fb62dcb6ce0ce5c9bce85a71247a3750f10a1edec5f1532458c
5
5
  SHA512:
6
- metadata.gz: 07d4d6629a4737e2f4fd571a9be4dd586671f56275f41d6d34ed4390255ab1d9094c17ffffb1de0e02f7b10b140a7dcaa28457c8be6e44eebdce875bd47d2d7f
7
- data.tar.gz: 38efb142fa8fb83b3b7836d1a9a6127c8063d1371b39a78fb0b4e3207fcbf1d81acb03f263596e28ff3dcb4bcc59119fdd75193742d8cd568216ed74f012112b
6
+ metadata.gz: 8886c9761492e0ee4fc892e2605c2aab1c7e508d2d1a04af7ea9d0d1c80b3d9a03244ed56e4587b36ff7695fc31697db8538ac7e11d241132a026dd04aaf91db
7
+ data.tar.gz: 779c4a1e9bf5057b2f89d0b4f991a7c149a29f4f70d7df85a4d362f4369cca4885ce42ba3e5837de8685828b47bab84bc1f1840bc942fbe55a5e0505cf14c7ee
data/lib/bin/build_env.sh CHANGED
@@ -9,6 +9,8 @@ if [ -n "$GITHUB_ACTIONS" ]; then
9
9
  target_branch=${GITHUB_BASE_REF}
10
10
  actor=$GITHUB_ACTOR
11
11
  sha=$GITHUB_SHA
12
+ run_id=$GITHUB_RUN_ID
13
+ run_attempt=$GITHUB_RUN_ATTEMPT
12
14
  commit_message=$(git log --format=%s -n 1 $sha)
13
15
  else
14
16
  platform=$SELECTIVE_PLATFORM
@@ -17,6 +19,8 @@ else
17
19
  target_branch=$SELECTIVE_TARGET_BRANCH
18
20
  actor=$SELECTIVE_ACTOR
19
21
  sha=$SELECTIVE_SHA
22
+ run_id=$SELECTIVE_RUN_ID
23
+ run_attempt=$SELECTIVE_RUN_ATTEMPT
20
24
  commit_message=$(git log --format=%s -n 1 $sha)
21
25
  fi
22
26
 
@@ -29,6 +33,8 @@ cat <<EOF
29
33
  "target_branch": "$target_branch",
30
34
  "actor": "$actor",
31
35
  "sha": "$sha",
36
+ "run_id": "$run_id",
37
+ "run_attempt": "$run_attempt",
32
38
  "commit_message": "$commit_message"
33
39
  }
34
40
  EOF
data/lib/bin/transport CHANGED
Binary file
@@ -101,13 +101,15 @@ module Selective
101
101
  def transport_url
102
102
  @transport_url ||= begin
103
103
  api_key = ENV.fetch("SELECTIVE_API_KEY")
104
- run_id = ENV.fetch("SELECTIVE_RUN_ID")
105
- run_attempt = ENV.fetch("SELECTIVE_RUN_ATTEMPT", SecureRandom.uuid)
106
104
  host = ENV.fetch("SELECTIVE_HOST", "wss://app.selective.ci")
107
105
 
108
106
  # Validate that host is a valid websocket url(starts with ws:// or wss://)
109
107
  raise "Invalid host: #{host}" unless host.match?(/^wss?:\/\//)
110
108
 
109
+ run_id = build_env.delete("run_id")
110
+ run_attempt = build_env.delete("run_attempt")
111
+ run_attempt = SecureRandom.uuid if run_attempt.nil? || run_attempt.empty?
112
+
111
113
  params = {
112
114
  "run_id" => run_id,
113
115
  "run_attempt" => run_attempt,
@@ -3,7 +3,7 @@
3
3
  module Selective
4
4
  module Ruby
5
5
  module Core
6
- VERSION = "0.1.2"
6
+ VERSION = "0.1.3"
7
7
  end
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: selective-ruby-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: x86_64-linux
6
6
  authors:
7
7
  - Benjamin Wood
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2023-11-14 00:00:00.000000000 Z
12
+ date: 2023-11-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: zeitwerk