File tree Expand file tree Collapse file tree 1 file changed +20
-3
lines changed Expand file tree Collapse file tree 1 file changed +20
-3
lines changed Original file line number Diff line number Diff line change 1
- # The Tailwind CSS CLI package to install (pick the one that matches your OS: https://github.com/tailwindlabs/tailwindcss/releases/latest)
2
- TAILWIND_PACKAGE = tailwindcss-linux-x64
1
+ # Get the OS name in lowercase (linux, darwin)
2
+ OS_SYSNAME := $(shell uname -s | tr A-Z a-z)
3
+ # Get the machine architecture (x86_64, arm64)
4
+ OS_MACHINE := $(shell uname -m)
5
+
6
+ # If mac OS, use `macos-arm64` or `macos-x64`
7
+ ifeq ($(OS_SYSNAME ) ,darwin)
8
+ OS_SYSNAME = macos
9
+ ifneq ($(OS_MACHINE),arm64)
10
+ OS_MACHINE = x64
11
+ endif
12
+ endif
13
+
14
+ # If Linux, use `linux-x64`
15
+ ifeq ($(OS_SYSNAME ) ,linux)
16
+ OS_MACHINE = x64
17
+ endif
18
+
19
+ TAILWIND_PACKAGE = tailwindcss-$(OS_SYSNAME ) -$(OS_MACHINE )
3
20
4
21
.PHONY : help
5
22
help : # # Print make targets
@@ -59,4 +76,4 @@ css: ## Build and minify Tailwind CSS
59
76
60
77
.PHONY : build
61
78
build : css # # Build CSS and compile the application binary
62
- go build -o ./tmp/main ./cmd/web
79
+ go build -o ./tmp/main ./cmd/web
You can’t perform that action at this time.
0 commit comments