Skip to content

Commit

Permalink
Build CLI script
Browse files Browse the repository at this point in the history
  • Loading branch information
spetz committed Jun 21, 2019
1 parent 00e81e9 commit d43b0bd
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions scripts/packaging/build-cli.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
RELEASE_DIRECTORY=../../../../nethermind-packages
CLI_PATH=nethermind/src/Nethermind/Nethermind.Cli
LINUX=linux-x64
OSX=osx-x64
WIN10=win10-x64
PUBLISH_PATH=bin/release/netcoreapp2.2
EXEC=Nethermind.Cli
ZIP=$EXEC.zip
OUT=out
LIN_RELEASE=nethermind-lin-x64
OSX_RELEASE=nethermind-osx-x64
WIN_RELEASE=nethermind-win-x64

cd $CLI_PATH

echo =======================================================
echo Publishing Nethermind Cli for different platforms...
echo =======================================================
echo Nethermind Cli path: $CLI_PATH

dotnet publish -c release -r $LINUX
dotnet publish -c release -r $OSX
dotnet publish -c release -r $WIN10

rm -rf $OUT && mkdir $OUT $OUT/$LINUX $OUT/$OSX $OUT/$WIN10

echo =======================================================
echo Packing Nethermind Cli for different platforms...
echo =======================================================

warp-packer --arch linux-x64 --input_dir $PUBLISH_PATH/$LINUX/publish --exec $EXEC --output $OUT/$LINUX/$EXEC
warp-packer --arch macos-x64 --input_dir $PUBLISH_PATH/$OSX/publish --exec $EXEC --output $OUT/$OSX/$EXEC
warp-packer --arch windows-x64 --input_dir $PUBLISH_PATH/$WIN10/publish --exec $EXEC.exe --output $OUT/$WIN10/$EXEC.exe

mkdir -p $RELEASE_DIRECTORY/$LIN_RELEASE
mkdir -p $RELEASE_DIRECTORY/$OSX_RELEASE
mkdir -p $RELEASE_DIRECTORY/$WIN_RELEASE

mv $OUT/$LINUX/$EXEC $RELEASE_DIRECTORY/$LIN_RELEASE
mv $OUT/$OSX/$EXEC $RELEASE_DIRECTORY/$OSX_RELEASE
mv $OUT/$WIN10/$EXEC.exe $RELEASE_DIRECTORY/$WIN_RELEASE

rm -rf $OUT

echo =======================================================
echo Building Nethermind Cli completed
echo =======================================================

0 comments on commit d43b0bd

Please sign in to comment.