Last active
April 23, 2018 12:37
-
-
Save bokobza/e68832f5d7d4102bcb33fcde8d9a72fb to your computer and use it in GitHub Desktop.
Build and run a Stratis node
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$Repo = "https://github.com/stratisproject/StratisBitcoinFullNode.git" | |
$Configuration = "release" # or "debug" | |
$Folder_name = "StratisBitcoinFullNode3" # can be any name that you want, this will create a folder and put the code in it | |
$Network = "stratis" # replace with "bitcoin" for bitcoin | |
Write-Host "Cloning the repo..." -foregroundcolor "magenta" | |
git clone $Repo $Folder_name | |
cd $Folder_name | |
Write-Host "Getting submodule dependencies..." -foregroundcolor "magenta" | |
git submodule update --init --recursive | |
If ($Network -eq "stratis") {cd src\Stratis.StratisD} | |
Else {cd src\Stratis.BitcoinD} | |
Write-Host "[$Configuration] Doing dotnet build" -foregroundcolor "magenta" | |
dotnet build -c $Configuration -v m | |
Write-Host "[$Configuration] Done dotnet build" -foregroundcolor "magenta" | |
Write-Host "[$Configuration] Running the node" -foregroundcolor "magenta" | |
dotnet run -testnet | |
if ($LastExitCode -ne 0) { | |
$host.SetShouldExit($LastExitCode) | |
Read-Host "Press ENTER to exit." | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Needs to be