Skip to content

Commit e704909

Browse files
committed
Fix NodeJS binding build-from-source, fixes #701
1 parent ac9e20d commit e704909

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

bindings/js/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
SHELL=/usr/bin/env bash
22
HASH=`git log -1 --format="%H"`
33
VERSION=`git describe --tags --abbrev=0 | cut -b 2-`
4+
NODE_VERSION=`node -e 'console.log(require('./package.json').version);'`
45

56
# needed explicitly for Windows
67
export CGO_ENABLED=1
@@ -16,7 +17,7 @@ all: build
1617
# called by node-gyp for build-from-source
1718
compile:
1819
go mod init
19-
go get github.com/tdewolff/minify/v2@${HASH}
20+
go get github.com/tdewolff/minify/v2@${NODE_VERSION}
2021
go build -buildmode=c-archive -o minify.a minify.go
2122

2223
build:

0 commit comments

Comments
 (0)