Skip to content

Commit 4b7c15e

Browse files
committed
🔥 Remove gem release signing logic
Signed-off-by: Peter H. Boling <[email protected]>
1 parent 20ae716 commit 4b7c15e

File tree

5 files changed

+31
-60
lines changed

5 files changed

+31
-60
lines changed

.envrc

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Run any command in this library's bin/ without the bin/ prefix!
2+
# Prefer exe version over binstub
3+
PATH_add exe
4+
PATH_add bin
5+
6+
# Only add things to this file that should be shared with the team.
7+
8+
# **dotenv** (See end of file for .env.local integration)
9+
# .env would override anything in this file, if enabled.
10+
# .env is a DOCKER standard, and if we use it, it would be in deployed, or DOCKER, environments.
11+
# Override and customize anything below in your own .env.local
12+
# If you are using dotenv and not direnv,
13+
# copy the following `export` statements to your own .env file.
14+
export MIMIC_NEXT_MAJOR_VERSION=false
15+
export ARUBA_NO_COVERAGE=false
16+
17+
### General Ruby ###
18+
# Turn off Ruby Warnings about deprecated code
19+
# export RUBYOPT="-W0"
20+
21+
# Internal Debugging Controls
22+
export DEBUG=false # do not allow byebug statements (override in .env.local)
23+
24+
# .env would override anything in this file, if `dotenv` is uncommented below.
25+
# .env is a DOCKER standard, and if we use it, it would be in deployed, or DOCKER, environments,
26+
# and that is why we generally want to leave it commented out.
27+
# dotenv
28+
29+
# .env.local will override anything in this file.
30+
dotenv_if_exists .env.local

CONTRIBUTING.md

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ General/runtime
2828
- MIMIC_NEXT_MAJOR_VERSION: When set to true, simulates the next major version for testing breaking changes [📌semver-breaking] [📌major-versions-not-sacred] (default: false)
2929
- ARUBA_NO_COVERAGE: Disable SimpleCov coverage in Aruba tests (default: false)
3030

31-
Releasing and signing
32-
- SKIP_GEM_SIGNING: If set, skip gem signing during build/release
33-
- GEM_CERT_USER: Username for selecting your public cert in `certs/<USER>.pem` (defaults to $USER)
34-
3531
For a quick starting point, this repository’s `.envrc` shows sane defaults, and `.env.local` can override them locally.
3632

3733
## Testing
@@ -90,16 +86,6 @@ Made with [contributors-img][🖐contrib-rocks].
9086

9187
## For Maintainers
9288

93-
### One-time, Per-maintainer, Setup
94-
95-
**IMPORTANT**: To sign a build,
96-
a public key for signing gems will need to be picked up by the line in the
97-
`gemspec` defining the `spec.cert_chain` (check the relevant ENV variables there).
98-
All releases after v1.1.0 are signed releases.
99-
See: [RubyGems Security Guide][🔒️rubygems-security-guide]
100-
101-
NOTE: To build without signing the gem set `SKIP_GEM_SIGNING` to any value in the environment. Only do this for testing.
102-
10389
### To release a new version:
10490

10591
#### Automated process

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
# CycloneDX Ruby Gem
1111

12-
The CycloneDX Ruby Gem creates a valid CycloneDX Software Bill of Materials (SBOM) from all project dependencies. CycloneDX is a lightweight SBOM specification that is easily created, human readable, and simple to parse.
12+
The CycloneDX Ruby Gem creates a valid CycloneDX Software Bill of Materials (SBOM) from all project dependencies. CycloneDX is a lightweight SBOM specification that is easily created, human-readable, and simple to parse.
1313

1414
#### Installing from RubyGems
1515

certs/pboling.pem

Lines changed: 0 additions & 27 deletions
This file was deleted.

cyclonedx-ruby.gemspec

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,6 @@ Gem::Specification.new do |spec|
1414
spec.license = 'Apache-2.0'
1515
spec.required_ruby_version = '>= 2.7.0'
1616

17-
# Linux distros often package gems and securely certify them independent
18-
# of the official RubyGem certification process. Allowed via ENV["SKIP_GEM_SIGNING"]
19-
# Ref: https://gitlab.com/ruby-oauth/version_gem/-/issues/3
20-
# Hence, only enable signing if `SKIP_GEM_SIGNING` is not set in ENV.
21-
# See CONTRIBUTING.md
22-
unless ENV.include?("SKIP_GEM_SIGNING")
23-
user_cert = "certs/#{ENV.fetch("GEM_CERT_USER", ENV["USER"])}.pem"
24-
cert_file_path = File.join(__dir__, user_cert)
25-
cert_chain = cert_file_path.split(",")
26-
cert_chain.select! { |fp| File.exist?(fp) }
27-
if cert_file_path && cert_chain.any?
28-
spec.cert_chain = cert_chain
29-
if $PROGRAM_NAME.end_with?("gem") && ARGV[0] == "build"
30-
spec.signing_key = File.join(Gem.user_home, ".ssh", "gem-private_key.pem")
31-
end
32-
end
33-
end
34-
3517
spec.metadata["homepage_uri"] = "https://github.com/CycloneDX/cyclonedx-ruby-gem?tab=readme-ov-file#readme"
3618
spec.metadata["source_code_uri"] = "https://github.com/CycloneDX/cyclonedx-ruby-gem/tree/v#{spec.version}"
3719
spec.metadata["changelog_uri"] = "https://github.com/CycloneDX/cyclonedx-ruby-gem/blob/v#{spec.version}/CHANGELOG.md"

0 commit comments

Comments
 (0)