Skip to content

Commit 11d75a3

Browse files
committed
fix: ship an x86_64-linux-musl platform gem
This was not strictly necessary before now because musl platforms have always used the generic platform gem, but recent changes in rubygems and bundler introduced new behaviors around libc flavors, and so we're going the extra mile here to be explicit. See #192 for context, also see rubygems/rubygems#5875
1 parent 831d929 commit 11d75a3

File tree

4 files changed

+26
-9
lines changed

4 files changed

+26
-9
lines changed

.github/workflows/gem-install.yml

+14-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ jobs:
55
strategy:
66
fail-fast: false
77
matrix:
8-
platform: ["ruby", "x64-mingw32", "x64-mingw-ucrt", "x86_64-darwin", "x86_64-linux"]
8+
platform: ["ruby", "x64-mingw32", "x64-mingw-ucrt", "x86_64-darwin", "x86_64-linux", "x86_64-linux-musl"]
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/checkout@v2
@@ -49,6 +49,19 @@ jobs:
4949
- run: "gem install pkg/tailwindcss-rails-*.gem"
5050
- run: "tailwindcss --help"
5151

52+
linux-musl-install:
53+
needs: ["package"]
54+
runs-on: ubuntu-latest
55+
container:
56+
image: ruby:3.1-alpine
57+
steps:
58+
- uses: actions/download-artifact@v2
59+
with:
60+
name: gem-x86_64-linux-musl
61+
path: pkg
62+
- run: "gem install pkg/tailwindcss-rails-*.gem"
63+
- run: "tailwindcss --help"
64+
5265
darwin-install:
5366
needs: ["package"]
5467
runs-on: macos-latest

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ Some users are reporting this error even when running on one of the supported na
5050
- x64-mingw-ucrt
5151
- x86_64-darwin
5252
- x86_64-linux
53+
- x86_64-linux-musl
5354
- aarch64-linux
5455

5556
#### Check Bundler PLATFORMS

lib/tailwindcss/upstream.rb

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ module Upstream
1010
"x64-mingw-ucrt" => "tailwindcss-windows-x64.exe",
1111
"x86_64-darwin" => "tailwindcss-macos-x64",
1212
"x86_64-linux" => "tailwindcss-linux-x64",
13+
"x86_64-linux-musl" => "tailwindcss-linux-x64",
1314
"aarch64-linux" => "tailwindcss-linux-arm64",
1415
}
1516
end

rakelib/package.rake

+10-8
Original file line numberDiff line numberDiff line change
@@ -39,21 +39,23 @@
3939
# - pkg/tailwindcss-rails-1.0.0-x64-mingw-ucrt.gem
4040
# - pkg/tailwindcss-rails-1.0.0-x86_64-darwin.gem
4141
# - pkg/tailwindcss-rails-1.0.0-x86_64-linux.gem
42+
# - pkg/tailwindcss-rails-1.0.0-x86_64-linux-musl.gem
4243
#
4344
# Note that in addition to the native gems, a vanilla "ruby" gem will also be created without
4445
# either the `exe/tailwindcss` script or a binary executable present.
4546
#
4647
#
4748
# New rake tasks created:
4849
#
49-
# - rake gem:ruby # Build the ruby gem
50-
# - rake gem:aarch64-linux # Build the aarch64-linux gem
51-
# - rake gem:arm64-darwin # Build the arm64-darwin gem
52-
# - rake gem:x64-mingw32 # Build the x64-mingw32 gem
53-
# - rake gem:x64-mingw-ucrt # Build the x64-mingw-ucrt gem
54-
# - rake gem:x86_64-darwin # Build the x86_64-darwin gem
55-
# - rake gem:x86_64-linux # Build the x86_64-linux gem
56-
# - rake download # Download all tailwindcss binaries
50+
# - rake gem:ruby # Build the ruby gem
51+
# - rake gem:aarch64-linux # Build the aarch64-linux gem
52+
# - rake gem:arm64-darwin # Build the arm64-darwin gem
53+
# - rake gem:x64-mingw32 # Build the x64-mingw32 gem
54+
# - rake gem:x64-mingw-ucrt # Build the x64-mingw-ucrt gem
55+
# - rake gem:x86_64-darwin # Build the x86_64-darwin gem
56+
# - rake gem:x86_64-linux # Build the x86_64-linux gem
57+
# - rake gem:x86_64-linux-musl # Build the x86_64-linux gem
58+
# - rake download # Download all tailwindcss binaries
5759
#
5860
# Modified rake tasks:
5961
#

0 commit comments

Comments
 (0)