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

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: de5a1cbd67c1d87b590371321c194cd39ebb4c48262b2cebcbf9af3a167d4d37
4
- data.tar.gz: 1b9841d87eae5f184b4a2048262a7871b48339d0b31f22f8b0f1311d2c79932c
3
+ metadata.gz: 768c13ee1e2c74fe8909abdb4cf2193402e16bea564c42cb040d3d97ca096738
4
+ data.tar.gz: d6f01be1d6bababc38807173b73ca4f77f329deca59f3c65d4be3b1458c24c56
5
5
  SHA512:
6
- metadata.gz: 32ba16bd2e9818f3bbdd0687715c4804688f12fbf16981688f879615318a6dd17d1f5b7ac7e76e10fa6c159ded6b54bf2e77b2e98affc2e4580935db90fbf345
7
- data.tar.gz: 5036c3e0f58bd830f5c7362f051baf5654c85020bd473aa2f9de32b16c3517714b37ac004ec770e3b63d0f8e659593257084b005b1467f5143fbfdbce54830cb
6
+ metadata.gz: 394cd0376b4ca2298917828d179fd82f373a49c0a147a1bc4ba06e630aacffc90518d13afd7ee0c886229d2502393e1980e35c40bc2772f35069ba065f61f686
7
+ data.tar.gz: 14bb3272aa4d945afff46647c3a8f63b464b83ced81f6ede396c58e944a3299cf0c265923132721a5d44700e4b03cd0997bd577c694a5e42e8b31552ba771f2b
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-darwin
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