selective-ruby-core 0.1.2-aarch64-linux → 0.1.3-aarch64-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: f46c8813512297c86dcc7d42a197c19c69261610793c6476b0ef863e94eac062
4
- data.tar.gz: 59b7700e822f4810a468013ac74701976bcdc09426b718b35bc4350fdde06f14
3
+ metadata.gz: 4711eb5934ba70787fd7c9d8089a5cd046467b1000a9f6c427170ffa67d5afa8
4
+ data.tar.gz: 4b113ed2848bebae3105e0cb317951e5e3daeee79cb37164dbd0a7c4ff3ffb16
5
5
  SHA512:
6
- metadata.gz: 87c2116863c1db55e887569178d8c5b109ee4c50fd9b64413410e9a274da99999ff0756da57b22d80a9ab019761fedc6d53231f878d5eca3f4a52ef1b9b5385f
7
- data.tar.gz: 7e78f5ee5c42ed2d92cb76a2a38225703b3d13d8cb4b2439b117baaf5319933c94139634cde9fde5bab49fbac50b9c369916397f0cdf9ca2005da9a458013c06
6
+ metadata.gz: a282467b7d15f0e3bd04dd306ca55ad3b84c08fd9ee27ccac3dbbd7f2f0547a2d4925836bb1cfcc243b7c8486cd026535155f5d878868a8ef89bf488c4f5c4a4
7
+ data.tar.gz: 48b4e59d3d48756bdc477841f0c39fb62c689a5541cc3e6581f16b8217c636d19f0cccf19445e0d645c1fe27a9d0351e9e3420a6cafcd5d429be65d362b66fc6
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: aarch64-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