Skip to content

Instantly share code, notes, and snippets.

@bokobza
Last active April 23, 2018 12:37
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bokobza/e68832f5d7d4102bcb33fcde8d9a72fb to your computer and use it in GitHub Desktop.
Save bokobza/e68832f5d7d4102bcb33fcde8d9a72fb to your computer and use it in GitHub Desktop.
Build and run a Stratis node
$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."
}
@Daandamhuis
Copy link

If ($Network -eq "stratis") {cd Stratis.StratisD} 
Else {cd Stratis.BitcoinD} 

Needs to be

If ($Network -eq "stratis") {cd src\Stratis.StratisD} 
Else {cd src\Stratis.BitcoinD} 

@bokobza
Copy link
Author

bokobza commented Mar 13, 2018

Thanks @Daandamhuis!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment