Skip to content

Commit 3ca5647

Browse files
[npm] binary now depends to package version
1 parent 1803c9c commit 3ca5647

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Release Rust Project
33
on:
44
push:
55
tags:
6-
- "v*"
6+
- "v*.**"
77

88
jobs:
99
build:

npm-package/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "next-css-linter",
3-
"version": "1.0.3",
3+
"version": "1.4.1",
44
"description": "Linter for NextJs CSS modules",
55
"main": "index.js",
66
"scripts": {

npm-package/src/install.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,20 @@ const { writeFileSync, chmodSync, mkdirSync } = require("fs");
22
const { join } = require("path");
33
const { get } = require("https");
44
const os = require("os");
5+
var pjson = require('../package.json');
56

67
const binaries = {
78
linux: "css-linter-linux",
89
darwin: "css-linter-macos",
910
win32: "css-linter-win.exe",
1011
};
1112

13+
let exe_ver = pjson.version.split('.').slice(0, 2).join('.');
14+
1215
const urls = {
13-
linux: "https://github.com/Andcool-Systems/css-linter/releases/latest/download/css-linter-linux",
14-
darwin: "https://github.com/Andcool-Systems/css-linter/releases/latest/download/css-linter-macos",
15-
win32: "https://github.com/Andcool-Systems/css-linter/releases/latest/download/css-linter-win.exe",
16+
linux: `https://github.com/Andcool-Systems/css-linter/releases/download/v${exe_ver}/css-linter-linux`,
17+
darwin: `https://github.com/Andcool-Systems/css-linter/releases/download/v${exe_ver}/css-linter-macos`,
18+
win32: `https://github.com/Andcool-Systems/css-linter/releases/download/v${exe_ver}/css-linter-win.exe`,
1619
};
1720

1821
const platform = os.platform();

0 commit comments

Comments
 (0)