-
Notifications
You must be signed in to change notification settings - Fork 176
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support arm64 for .NET and Go Sample Lambda Funcs (#192)
- Loading branch information
1 parent
9538af1
commit 9ca06c4
Showing
2 changed files
with
22 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,24 @@ | ||
#!/bin/sh | ||
|
||
GOARCH=${GOARCH-amd64} | ||
|
||
# Chosen from Microsoft's documentation for Runtime Identifier (RIDs) | ||
# See more: https://docs.microsoft.com/en-us/dotnet/core/rid-catalog#linux-rids | ||
if [ $GOARCH = "amd64" ]; then | ||
DOTNET_LINUX_ARCH=x64 | ||
elif [ $GOARCH = "arm64" ]; then | ||
DOTNET_LINUX_ARCH=arm64 | ||
else | ||
echo "Invalid GOARCH value `$GOARCH` received." | ||
exit 2 | ||
fi | ||
|
||
mkdir -p build/dotnet | ||
dotnet publish --output "./build/dotnet" --configuration "Release" --framework "netcoreapp3.1" /p:GenerateRuntimeConfigurationFiles=true --runtime linux-x64 --self-contained false | ||
dotnet publish \ | ||
--output "./build/dotnet" \ | ||
--configuration "Release" \ | ||
--framework "netcoreapp3.1" /p:GenerateRuntimeConfigurationFiles=true \ | ||
--runtime linux-$DOTNET_LINUX_ARCH \ | ||
--self-contained false | ||
cd build/dotnet || exit | ||
zip -r ../function.zip * |
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 |
---|---|---|
@@ -1,6 +1,8 @@ | ||
#!/bin/sh | ||
|
||
GOARCH=${GOARCH-amd64} | ||
|
||
mkdir -p build | ||
GOOS=linux GOARCH=amd64 go build -o ./build/bootstrap . | ||
GOOS=linux go build -o ./build/bootstrap . | ||
cd build || exit | ||
zip bootstrap.zip bootstrap |