Skip to content

Commit

Permalink
Include more Ruby metadata files
Browse files Browse the repository at this point in the history
- include `.ruby-version` and in the project root (and unignore in
  `.gitignore`) to improve editor support which expects these files
- use the `.ruby-version` in `docs/Gemfile` to use a consistent Ruby
  version here
- remove hardcoded Ruby versions from `workflows/docs` in favour of
  using the `.ruby-version` file instead
- use more consistent configuration in `workflows/docs` to match
  `workflows/tests`
  • Loading branch information
MikeMcQuaid committed May 23, 2024
1 parent 93eb5ea commit 3392226
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 4 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ on:
permissions:
contents: read

env:
HOMEBREW_DEVELOPER: 1
HOMEBREW_NO_AUTO_UPDATE: 1
HOMEBREW_NO_ENV_HINTS: 1
HOMEBREW_BOOTSNAP: 1
HOMEBREW_NO_INSTALL_CLEANUP: 1

jobs:
linting:
if: github.repository == 'Homebrew/brew'
Expand Down Expand Up @@ -45,7 +52,6 @@ jobs:
- name: Install Ruby
uses: ruby/setup-ruby@943103cae7d3f1bb1e4951d5fcc7928b40e4b742 # v1.177.1
with:
ruby-version: "3.1"
bundler-cache: true
working-directory: ${{ steps.set-up-homebrew.outputs.repository-path }}/docs

Expand Down Expand Up @@ -85,8 +91,8 @@ jobs:
- name: Install Ruby
uses: ruby/setup-ruby@943103cae7d3f1bb1e4951d5fcc7928b40e4b742 # v1.177.1
with:
ruby-version: "3.1"
bundler-cache: true
working-directory: rubydoc

- name: Process rubydoc comments
working-directory: ${{ steps.set-up-homebrew.outputs.repository-path }}/Library/Homebrew
Expand Down
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,10 @@
!/.editorconfig
!/.gitignore
!/.irb_config
!/.yardopts
!/.vale.ini
!/.ruby-version
!/.shellcheckrc
!/.vale.ini
!/.yardopts
!/CHANGELOG.md
!/CONTRIBUTING.md
!/Dockerfile
Expand Down
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.3.1
1 change: 1 addition & 0 deletions docs/.ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.3.1
2 changes: 2 additions & 0 deletions docs/Gemfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
source "https://rubygems.org"

ruby file: ".ruby-version"

gem "github-pages", group: :jekyll_plugins

group :test do
Expand Down

0 comments on commit 3392226

Please sign in to comment.