Skip to content

Commit

Permalink
Only patch version on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
yasserf committed Jun 28, 2016
1 parent c4f4134 commit 50742ab
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions scripts/package.sh
Expand Up @@ -66,16 +66,19 @@ curl -o node-$NODE_VERSION_WITHOUT_V.tar.gz https://nodejs.org/dist/v$NODE_VERSI
tar -xzf node-$NODE_VERSION_WITHOUT_V.tar.gz
cd -

echo "Patch the window executable icon and details"
cp scripts/resources/node.rc $NODE_SOURCE/src/res/node.rc
cp scripts/resources/deepstream.ico $NODE_SOURCE/src/res/deepstream.ico

NAME=$PACKAGE_VERSION
if ! [[ $PACKAGE_VERSION =~ ^[0-9]+[.][0-9]+[.][0-9]+$ ]]; then
echo "Version can't contain characters in MSBuild, so replacing $PACKAGE_VERSION with 0.0.0"
NAME="0.0.0"
if [ $OS = "win32" ]; then
NAME=$PACKAGE_VERSION

echo "Patch the window executable icon and details"
cp scripts/resources/node.rc $NODE_SOURCE/src/res/node.rc
cp scripts/resources/deepstream.ico $NODE_SOURCE/src/res/deepstream.ico

if ! [[ $PACKAGE_VERSION =~ ^[0-9]+[.][0-9]+[.][0-9]+$ ]]; then
echo "Version can't contain characters in MSBuild, so replacing $PACKAGE_VERSION with 0.0.0"
NAME="0.0.0"
fi
sed -i 's/DEEPSTREAM_VERSION/$NAME/' $NODE_SOURCE/src/res/node.rc
fi
sed -i 's/DEEPSTREAM_VERSION/$NAME/' $NODE_SOURCE/src/res/node.rc

# Nexe Patches
echo "Patching winston files for nexe/browserify"
Expand Down

0 comments on commit 50742ab

Please sign in to comment.