8000 [pkg] add script for windows · zhangzhishan/leetcode-cli@fc4f4ac · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit fc4f4ac

Browse files
committed
[pkg] add script for windows
Signed-off-by: Eric Wang <skygragon@gmail.com>
1 parent a3b384f commit fc4f4ac

File tree

3 files changed

+22
-3
lines changed

3 files changed

+22
-3
lines changed

bin/pkg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ if (os === 'darwin') {
1111
args[1] = 'macos';
1212
} else if (os === 'win32') {
1313
bin = 'cmd.exe';
14-
args = ['/c', 'pkg.bat'].concat(args);
14+
args = ['/c', 'bin\\pkg.bat'].concat(args);
1515
}
1616

1717
var proc = require('child_process').spawn(bin, args);

bin/pkg.bat

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
@echo off
2+
set arch=%1
3+
set os=%2
4+
set ver=%3
5+
6+
for %%x in (company cookie.chrome cookie.firefox cpp.lint cpp.run github leetcode.cn lintcode solution.discuss) do (
7+
echo [%%x]
8+
node bin\leetcode ext -i %%x
9+
)
10+
11+
set dist=dist\
12+
mkdir %dist%
13+
del /q %dist%\*
14+
15+
for /r . %%x in (*.node) do copy %%x %dist%
16+
npm run pkg -- node%ver%-%os%-%arch%
17+
18+
set file=leetcode-cli.node%ver%.%os%.%arch%.zip
19+
7z a %file% %dist%

bin/pkg.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/bin/bash -e
22

33
arch=$1
44
os=$2
@@ -8,7 +8,7 @@ plugins="company cookie.chrome cookie.firefox cpp.lint cpp.run github leetcode.c
88

99
for plugin in $plugins; do
1010
echo "[$plugin]"
11-
#./bin/leetcode ext -i $plugin
11+
./bin/leetcode ext -i $plugin
1212
done
1313

1414
DIST=./dist

0 commit comments

Comments
 (0)
0