Skip to content

Commit 8ac6d29

Browse files
committed
tool: Install Go to build Go projects
To test AWS SDK for Go, we will build Go projects and put the binaries to the guest rootfs. Note that the Go lang and AWS SDK for Go are not put to the guest rootfs. Signed-off-by: Takahiro Itazuri <[email protected]>
1 parent 0be6471 commit 8ac6d29

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

resources/rebuild.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,18 @@ source "$GIT_ROOT_DIR/tools/functions"
1818
function install_dependencies {
1919
apt update
2020
apt install -y bc flex bison gcc make libelf-dev libssl-dev squashfs-tools busybox-static tree cpio curl patch docker.io
21+
22+
# Install Go
23+
version=$(curl -s https://go.dev/VERSION?m=text | head -n 1)
24+
case $ARCH in
25+
x86_64) archive="${version}.linux-amd64.tar.gz" ;;
26+
aarch64) archive="${version}.linux-arm64.tar.gz" ;;
27+
esac
28+
curl -LO http://go.dev/dl/${archive}
29+
tar -C /usr/local -xzf $archive
30+
export PATH=$PATH:/usr/local/go/bin
31+
go version
32+
rm $archive
2133
}
2234

2335
function prepare_docker {

0 commit comments

Comments
 (0)