Skip to content

Commit b14ab0f

Browse files
committed
Update build script
1 parent f7201d0 commit b14ab0f

File tree

4 files changed

+25
-23
lines changed

4 files changed

+25
-23
lines changed

.travis.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,8 @@ deploy:
2222
tags: true
2323
- provider: releases
2424
api_key: "$GITHUB_TOKEN"
25-
file:
26-
- "build/$TRAVIS_TAG/win-x64/react-stdio.exe"
27-
- "build/$TRAVIS_TAG/linux-x64/react-stdio"
28-
- "build/$TRAVIS_TAG/macos/react-stdio"
25+
file_glob: true
26+
file: build/*.zip
2927
skip_cleanup: true
3028
on:
3129
tags: true

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"server.js"
1313
],
1414
"scripts": {
15-
"build": "node ./scripts/build.js",
15+
"build": "./scripts/build.sh",
1616
"test": "jest"
1717
},
1818
"dependencies": {

scripts/build.js

Lines changed: 0 additions & 18 deletions
This file was deleted.

scripts/build.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
3+
mkdir -p build
4+
5+
tag=${TRAVIS_TAG:-"v$npm_package_version"}
6+
7+
# TODO: Enable x86 builds when https://github.com/zeit/pkg/issues/310 is fixed
8+
platforms=( win-x64 linux-x64 macos )
9+
10+
for platform in "${platforms[@]}"
11+
do
12+
archive=react-stdio-$platform
13+
14+
echo "Creating build/$archive..."
15+
16+
pkg bin/react-stdio -t $platform -o build/$archive/react-stdio
17+
echo "$tag" > build/$archive/version
18+
19+
cd build
20+
zip -q -r $archive $archive
21+
cd - > /dev/null
22+
done

0 commit comments

Comments
 (0)