| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -17,3 +17,4 @@ if (os === 'darwin') { | |||
| 17 | 17 | var proc = require('child_process').spawn(bin, args); | |
| 18 | 18 | proc.stdout.on('data', x => console.log(x.toString().trimRight('\n'))); | |
| 19 | 19 | proc.stderr.on('data', x => console.log(x.toString().trimRight('\n'))); | |
| 20 | + proc.on('close', process.exit); | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,17 +3,23 @@ set arch=%1 | |||
| 3 | 3 | set os=%2 | |
| 4 | 4 | set ver=%3 | |
| 5 | 5 | ||
| 6 | + set dist=dist\ | ||
| 7 | + set file=leetcode-cli.node%ver%.%os%.%arch%.zip | ||
| 8 | + | ||
| 9 | + mkdir %dist% | ||
| 10 | + del /q %dist%\* | ||
| 11 | + del /q *.zip | ||
| 12 | + | ||
| 6 | 13 | for %%x in (company cookie.chrome cookie.firefox cpp.lint cpp.run github leetcode.cn lintcode solution.discuss) do ( | |
| 7 | 14 | echo [%%x] | |
| 8 | 15 | node bin\leetcode ext -i %%x | |
| 16 | + if %ERRORLEVEL% gtr 0 exit /b 1 | ||
| 9 | 17 | ) | |
| 10 | 18 | ||
| 11 | - set dist=dist\ | ||
| 12 | - mkdir %dist% | ||
| 13 | - del /q %dist%\* | ||
| 14 | - | ||
| 15 | 19 | for /r . %%x in (*.node) do copy %%x %dist% | |
| 16 | - npm run pkg -- node%ver%-%os%-%arch% | ||
| 20 | + call npm run pkg -- node%ver%-%os%-%arch% | ||
| 21 | + if %ERRORLEVEL% gtr 0 exit /b 1 | ||
| 17 | 22 | ||
| 18 | - set file=leetcode-cli.node%ver%.%os%.%arch%.zip | ||
| 19 | - 7z a %file% %dist% | ||
| 23 | + 7z a %file% %dist% | ||
| 24 | + if %ERRORLEVEL% gtr 0 exit /b 1 | ||
| 25 | + exit 0 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4,20 +4,23 @@ arch=$1 | |||
| 4 | 4 | os=$2 | |
| 5 | 5 | ver=$3 | |
| 6 | 6 | ||
| 7 | + DIST=./dist | ||
| 8 | + FILE=leetcode-cli.node$ver.$os.$arch.tar.gz | ||
| 9 | + | ||
| 10 | + mkdir -p $DIST | ||
| 11 | + rm -rf $DIST/* | ||
| 12 | + rm -rf $FILE | ||
| 13 | + | ||
| 7 | 14 | plugins="company cookie.chrome cookie.firefox cpp.lint cpp.run github leetcode.cn lintcode solution.discuss" | |
| 8 | 15 | ||
| 9 | 16 | for plugin in $plugins; do | |
| 10 | 17 | echo "[$plugin]" | |
| 11 | 18 | ./bin/leetcode ext -i $plugin | |
| 12 | 19 | done | |
| 13 | 20 | ||
| 14 | - DIST=./dist | ||
| 15 | - mkdir -p $DIST | ||
| 16 | - rm -rf $DIST/* | ||
| 17 | - | ||
| 18 | 21 | find node_modules -name "*.node" -exec cp {} $DIST \; | |
| 19 | 22 | npm run pkg -- node$ver-$os-$arch | |
| 20 | 23 | ||
| 21 | - FILE=leetcode-cli.node$ver.$os.$arch.tar.gz | ||
| 22 | - tar zcvf $FILE $DIST | ||
| 24 | + tar zcvf $FILE $DIST | ||
| 23 | 25 | ls -al $FILE | |
| 26 | + exit 0 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments