selective-ruby-core 0.3.3-x86_64-darwin → 0.3.4-x86_64-darwin
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 +4 -4
- data/lib/bin/build_env.sh +54 -5
- data/lib/selective/ruby/core/version.rb +1 -1
- metadata +6 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 03d7bcee5c028872c2dad174112eb77ef48d5730c69af5705825d83b9e42fe72
|
|
4
|
+
data.tar.gz: 803f2713d28a3ee95467d71305a20fd720e9ec30009afc418d1bbd9b0ffe1eff
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1fc1a2f9f09ad00fa90d1882d7147e1ba965b9c88007026db762fe7ec8597b4b0e7b0572f7e83f90c90cd131ce706eb437dd2dcaf3e0d03526c339eeaf009803
|
|
7
|
+
data.tar.gz: 796cfcf3cc78637ee130e17c95f47abcd1968f3573883134529518eac1569220a36a61f302c2b527a5480cfe9ad59b6f5f956f756ec000fc56649a084bfdfa67
|
data/lib/bin/build_env.sh
CHANGED
|
@@ -11,6 +11,18 @@ parse_github_slug() {
|
|
|
11
11
|
esac
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
+
# Parse a "group/subgroup/project" path out of a gitlab.com remote URL (SSH or
|
|
15
|
+
# HTTPS). GitLab nests groups, so everything after the host is the path.
|
|
16
|
+
# Self-managed hosts can't be recognized from the URL; GitLab CI says so itself.
|
|
17
|
+
parse_gitlab_path() {
|
|
18
|
+
local url="$1"
|
|
19
|
+
case "$url" in
|
|
20
|
+
git@gitlab.com:*|https://gitlab.com/*|http://gitlab.com/*|ssh://git@gitlab.com/*|https://*@gitlab.com/*)
|
|
21
|
+
echo "$url" | sed -E 's#^(git@|(https?|ssh)://([^@/]+@)?)gitlab\.com[:/]##; s#\.git/?$##; s#/$##'
|
|
22
|
+
;;
|
|
23
|
+
esac
|
|
24
|
+
}
|
|
25
|
+
|
|
14
26
|
# Given a git remote URL, classify the provider as github|gitlab|bitbucket or
|
|
15
27
|
# empty when unrecognized. Used for the git_provider hint.
|
|
16
28
|
detect_git_provider_from_url() {
|
|
@@ -55,6 +67,30 @@ if [ -n "$GITHUB_ACTIONS" ]; then
|
|
|
55
67
|
base_sha=""
|
|
56
68
|
fi
|
|
57
69
|
fi
|
|
70
|
+
elif [ -n "$GITLAB_CI" ]; then
|
|
71
|
+
platform=gitlab_ci
|
|
72
|
+
branch=${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME:-${CI_COMMIT_BRANCH:-$CI_COMMIT_REF_NAME}}
|
|
73
|
+
target_branch=$CI_MERGE_REQUEST_TARGET_BRANCH_NAME
|
|
74
|
+
actor=$GITLAB_USER_LOGIN
|
|
75
|
+
sha=$CI_COMMIT_SHA
|
|
76
|
+
# Merged results pipelines run GitLab's merge commit; this is the branch's own commit.
|
|
77
|
+
head_sha=$CI_MERGE_REQUEST_SOURCE_BRANCH_SHA
|
|
78
|
+
run_id=$CI_PIPELINE_ID
|
|
79
|
+
run_attempt=1
|
|
80
|
+
runner_id=$CI_NODE_INDEX
|
|
81
|
+
pr_title=$CI_MERGE_REQUEST_TITLE
|
|
82
|
+
commit_message=$CI_COMMIT_TITLE
|
|
83
|
+
# CI_COMMIT_AUTHOR is "Name <email>".
|
|
84
|
+
committer_name=$(echo "$CI_COMMIT_AUTHOR" | sed -E 's/ *<[^>]*>$//')
|
|
85
|
+
committer_email=$(echo "$CI_COMMIT_AUTHOR" | sed -nE 's/.*<([^>]*)>$/\1/p')
|
|
86
|
+
git_repo_full_name=$CI_PROJECT_PATH
|
|
87
|
+
git_provider=gitlab
|
|
88
|
+
# Merge request pipelines give the merge base directly; branch pipelines
|
|
89
|
+
# give the commit the push started from.
|
|
90
|
+
base_sha=${CI_MERGE_REQUEST_DIFF_BASE_SHA:-$CI_COMMIT_BEFORE_SHA}
|
|
91
|
+
if [ "$base_sha" = "0000000000000000000000000000000000000000" ]; then
|
|
92
|
+
base_sha=""
|
|
93
|
+
fi
|
|
58
94
|
elif [ -n "$CIRCLECI" ]; then
|
|
59
95
|
platform=circleci
|
|
60
96
|
branch=$CIRCLE_BRANCH
|
|
@@ -66,12 +102,14 @@ elif [ -n "$CIRCLECI" ]; then
|
|
|
66
102
|
committer_name=$(git show -s --format='%an' -n 1 $sha)
|
|
67
103
|
committer_email=$(git show -s --format='%ae' -n 1 $sha)
|
|
68
104
|
# CircleCI has no single "slug" env var. Compose from username + reponame.
|
|
69
|
-
# These work for both GitHub OAuth and GitHub App pipelines.
|
|
70
|
-
#
|
|
71
|
-
#
|
|
105
|
+
# These work for both GitHub OAuth and GitHub App pipelines. GitLab nests
|
|
106
|
+
# groups, so its path comes from the repo URL instead; other providers
|
|
107
|
+
# (Bitbucket) get no slug.
|
|
72
108
|
if [ -n "$CIRCLE_PROJECT_USERNAME" ] && [ -n "$CIRCLE_PROJECT_REPONAME" ]; then
|
|
73
109
|
git_provider=$(detect_git_provider_from_url "$CIRCLE_REPOSITORY_URL")
|
|
74
|
-
if [ "$git_provider" = "
|
|
110
|
+
if [ "$git_provider" = "gitlab" ]; then
|
|
111
|
+
git_repo_full_name=$(parse_gitlab_path "$CIRCLE_REPOSITORY_URL")
|
|
112
|
+
elif [ "$git_provider" = "github" ] || [ -z "$CIRCLE_REPOSITORY_URL" ]; then
|
|
75
113
|
git_repo_full_name="${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}"
|
|
76
114
|
# If we fell through the "no repo URL" path, default provider to github
|
|
77
115
|
# since the slug composition path is specific to GitHub-style owner/repo.
|
|
@@ -94,7 +132,7 @@ elif [ -n "$SEMAPHORE" ]; then
|
|
|
94
132
|
committer_name=$(git show -s --format='%an' -n 1 $sha)
|
|
95
133
|
committer_email=$(git show -s --format='%ae' -n 1 $sha)
|
|
96
134
|
git_provider=$SEMAPHORE_GIT_PROVIDER
|
|
97
|
-
if [ "$git_provider" = "github" ]; then
|
|
135
|
+
if [ "$git_provider" = "github" ] || [ "$git_provider" = "gitlab" ]; then
|
|
98
136
|
git_repo_full_name=$SEMAPHORE_GIT_REPO_SLUG
|
|
99
137
|
fi
|
|
100
138
|
# SEMAPHORE_GIT_COMMIT_RANGE is "<base>...<head>" on push/PR events; take the
|
|
@@ -119,6 +157,9 @@ elif [ -n "$BUILDKITE" ]; then
|
|
|
119
157
|
if [ "$BUILDKITE_PIPELINE_PROVIDER" = "github" ]; then
|
|
120
158
|
git_provider=github
|
|
121
159
|
git_repo_full_name=$(parse_github_slug "$BUILDKITE_REPO")
|
|
160
|
+
elif [ "$BUILDKITE_PIPELINE_PROVIDER" = "gitlab" ]; then
|
|
161
|
+
git_provider=gitlab
|
|
162
|
+
git_repo_full_name=$(parse_gitlab_path "$BUILDKITE_REPO")
|
|
122
163
|
else
|
|
123
164
|
git_provider=$BUILDKITE_PIPELINE_PROVIDER
|
|
124
165
|
fi
|
|
@@ -142,6 +183,8 @@ elif [ -n "$RWX" ]; then
|
|
|
142
183
|
git_provider=$(detect_git_provider_from_url "$RWX_GIT_REPOSITORY_URL")
|
|
143
184
|
if [ "$git_provider" = "github" ]; then
|
|
144
185
|
git_repo_full_name="${RWX_GIT_REPOSITORY_NAME}"
|
|
186
|
+
elif [ "$git_provider" = "gitlab" ]; then
|
|
187
|
+
git_repo_full_name=$(parse_gitlab_path "$RWX_GIT_REPOSITORY_URL")
|
|
145
188
|
fi
|
|
146
189
|
elif [ -n "$MINT" ]; then
|
|
147
190
|
platform=rwx
|
|
@@ -160,6 +203,8 @@ elif [ -n "$MINT" ]; then
|
|
|
160
203
|
git_provider=$(detect_git_provider_from_url "$MINT_GIT_REPOSITORY_URL")
|
|
161
204
|
if [ "$git_provider" = "github" ]; then
|
|
162
205
|
git_repo_full_name="${MINT_GIT_REPOSITORY_NAME}"
|
|
206
|
+
elif [ "$git_provider" = "gitlab" ]; then
|
|
207
|
+
git_repo_full_name=$(parse_gitlab_path "$MINT_GIT_REPOSITORY_URL")
|
|
163
208
|
fi
|
|
164
209
|
fi
|
|
165
210
|
|
|
@@ -171,9 +216,13 @@ if [ -z "$git_repo_full_name" ] && command -v git >/dev/null 2>&1; then
|
|
|
171
216
|
origin_url=$(git config --get remote.origin.url 2>/dev/null || true)
|
|
172
217
|
if [ -n "$origin_url" ]; then
|
|
173
218
|
parsed_slug=$(parse_github_slug "$origin_url")
|
|
219
|
+
parsed_gitlab=$(parse_gitlab_path "$origin_url")
|
|
174
220
|
if [ -n "$parsed_slug" ]; then
|
|
175
221
|
git_repo_full_name="$parsed_slug"
|
|
176
222
|
[ -z "$git_provider" ] && git_provider=github
|
|
223
|
+
elif [ -n "$parsed_gitlab" ]; then
|
|
224
|
+
git_repo_full_name="$parsed_gitlab"
|
|
225
|
+
[ -z "$git_provider" ] && git_provider=gitlab
|
|
177
226
|
elif [ -z "$git_provider" ]; then
|
|
178
227
|
git_provider=$(detect_git_provider_from_url "$origin_url")
|
|
179
228
|
fi
|
metadata
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: selective-ruby-core
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.4
|
|
5
5
|
platform: x86_64-darwin
|
|
6
6
|
authors:
|
|
7
7
|
- Benjamin Wood
|
|
8
8
|
- Nate Vick
|
|
9
|
+
autorequire:
|
|
9
10
|
bindir: exe
|
|
10
11
|
cert_chain: []
|
|
11
|
-
date:
|
|
12
|
+
date: 2026-11-19 00:00:00.000000000 Z
|
|
12
13
|
dependencies:
|
|
13
14
|
- !ruby/object:Gem::Dependency
|
|
14
15
|
name: logger
|
|
@@ -83,6 +84,7 @@ metadata:
|
|
|
83
84
|
homepage_uri: https://www.selective.ci
|
|
84
85
|
source_code_uri: http://github.com/selectiveci/selective-ruby-core
|
|
85
86
|
changelog_uri: https://github.com/selectiveci/selective-ruby-core/blob/main/CHANGELOG.md
|
|
87
|
+
post_install_message:
|
|
86
88
|
rdoc_options: []
|
|
87
89
|
require_paths:
|
|
88
90
|
- lib
|
|
@@ -97,7 +99,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
97
99
|
- !ruby/object:Gem::Version
|
|
98
100
|
version: '0'
|
|
99
101
|
requirements: []
|
|
100
|
-
rubygems_version:
|
|
102
|
+
rubygems_version: 3.5.22
|
|
103
|
+
signing_key:
|
|
101
104
|
specification_version: 4
|
|
102
105
|
summary: Selective Ruby Client Core
|
|
103
106
|
test_files: []
|