-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from xanimo/go-wrappers
bindings: add golang build.sh script
- Loading branch information
Showing
3 changed files
with
30 additions
and
2 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
pushd `pwd`/bindings/golang/libdogecoin | ||
|
||
if ! command -v go &> /dev/null | ||
then | ||
wget https://go.dev/dl/go1.18.2.linux-amd64.tar.gz | ||
echo "e54bec97a1a5d230fc2f9ad0880fcbabb5888f30ed9666eca4a91c5a32e86cbc go1.18.2.linux-amd64.tar.gz" | sha256sum -c | ||
rm -rf /usr/local/go && tar -C /usr/local -xzf go1.18.2.linux-amd64.tar.gz | ||
echo "export PATH=$PATH:/usr/local/go/bin" >> ~/.bashrc | ||
source ~/.bashrc | ||
if ! command -v go &> /dev/null | ||
then | ||
echo "go could not be found" | ||
exit | ||
fi | ||
fi | ||
|
||
go build -x -work -ldflags '-linkmode external -extldflags "-static"' . | ||
|
||
go test -v | ||
|
||
go clean -x -i -testcache | ||
|
||
popd |
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