-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1756 from unboxed/simplify-workflow-linters
Use a matrix test for linters to reduce boilerplate
- Loading branch information
Showing
4 changed files
with
59 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
NODE_VERSION=$(cat .node-version) | ||
if ! grep -q "^ARG NODE_VERSION=$NODE_VERSION" docker/ruby/Dockerfile; then | ||
echo "Dockerfile has wrong node: $(grep '^ARG NODE_MAJOR' docker/ruby/Dockerfile)" >&2 | ||
exit 1 | ||
fi | ||
if ! grep -q "^ARG NODE_VERSION=$NODE_VERSION" Dockerfile.production; then | ||
echo "Dockerfile.production has wrong node: $(grep '^ARG NODE_MAJOR' Dockerfile.production)" >&2 | ||
exit 1 | ||
fi | ||
|
||
RUBY_VERSION=$(cat .ruby-version) | ||
if ! grep -q "^ARG RUBY_VERSION=$RUBY_VERSION" docker/ruby/Dockerfile; then | ||
echo "Dockerfile has wrong ruby: $(grep '^FROM ruby:' docker/ruby/Dockerfile)" >&2 | ||
exit 1 | ||
fi | ||
if ! grep -q "^ARG RUBY_VERSION=$RUBY_VERSION" Dockerfile.production; then | ||
echo "Dockerfile.production has wrong ruby: $(grep '^ARG RUBY_VERSION' Dockerfile.production)" >&2 | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# frozen_string_literal: true | ||
|
||
desc "Ensure language versions match" | ||
task language_versions: :environment do | ||
exit 1 unless system "bin/verify-language-versions.sh" | ||
end |