-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade to go 1.16 and add darwin-arm64 support. #42
Open
DennoVonDiesel
wants to merge
7
commits into
aws:mainline
Choose a base branch
from
planetscale:mainline
base: mainline
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+56
−23
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
01f1b13
Build darwin-arm64 binaries
078f0c1
Fix script logic
335820f
Merge pull request #2 from planetscale/denno-darwin-arm64-support
DennoVonDiesel 0653fad
Update to go 1.16 to support arm64
495692c
Merge pull request #3 from planetscale/denno-darwin-arm64-support
2ecda7c
Fix copy pasta
fdefda2
Merge pull request #4 from planetscale/denno-darwin-arm64-support
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,6 @@ | ||
FROM golang:1.15 | ||
FROM golang:1.16 | ||
|
||
RUN apt -y update && apt -y upgrade && apt -y install rpm tar gzip wget zip && apt clean all | ||
|
||
RUN mkdir /session-manager-plugin | ||
WORKDIR /session-manager-plugin | ||
WORKDIR /session-manager-plugin |
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,38 +1,49 @@ | ||
#!/usr/bin/env bash | ||
|
||
ARCH=$1 | ||
case $ARCH in | ||
amd64 | arm64) | ||
;; | ||
*) | ||
echo "Usage: $0 [amd64|arm64]" | ||
exit 1 | ||
esac | ||
|
||
echo "**********************************************" | ||
echo "Creating bundle zip file Mac OS X amd64 Plugin" | ||
echo "Creating bundle zip file Mac OS X $ARCH Plugin" | ||
echo "**********************************************" | ||
|
||
rm -rf ${GO_SPACE}/bin/darwin_amd64_plugin/sessionmanager-bundle | ||
|
||
rm -rf ${GO_SPACE}/bin/darwin_${ARCH}_plugin/sessionmanager-bundle | ||
|
||
echo "Creating bundle workspace" | ||
|
||
mkdir -p ${GO_SPACE}/bin/darwin_amd64_plugin/sessionmanager-bundle/bin | ||
mkdir -p ${GO_SPACE}/bin/darwin_${ARCH}_plugin/sessionmanager-bundle/bin | ||
|
||
echo "Copying application files" | ||
|
||
cp ${GO_SPACE}/LICENSE ${GO_SPACE}/bin/darwin_amd64_plugin/sessionmanager-bundle/LICENSE | ||
cp ${GO_SPACE}/NOTICE ${GO_SPACE}/bin/darwin_amd64_plugin/sessionmanager-bundle/NOTICE | ||
cp ${GO_SPACE}/THIRD-PARTY ${GO_SPACE}/bin/darwin_amd64_plugin/sessionmanager-bundle/THIRD-PARTY | ||
cp ${GO_SPACE}/README.md ${GO_SPACE}/bin/darwin_amd64_plugin/sessionmanager-bundle/README.md | ||
cp ${GO_SPACE}/RELEASENOTES.md ${GO_SPACE}/bin/darwin_amd64_plugin/sessionmanager-bundle/RELEASENOTES.md | ||
cp ${GO_SPACE}/VERSION ${GO_SPACE}/bin/darwin_amd64_plugin/sessionmanager-bundle/VERSION | ||
cp ${GO_SPACE}/bin/darwin_amd64_plugin/session-manager-plugin ${GO_SPACE}/bin/darwin_amd64_plugin/sessionmanager-bundle/bin/session-manager-plugin | ||
cp ${GO_SPACE}/seelog_unix.xml ${GO_SPACE}/bin/darwin_amd64_plugin/sessionmanager-bundle/seelog.xml.template | ||
cp ${GO_SPACE}/LICENSE ${GO_SPACE}/bin/darwin_${ARCH}_plugin/sessionmanager-bundle/LICENSE | ||
cp ${GO_SPACE}/NOTICE ${GO_SPACE}/bin/darwin_${ARCH}_plugin/sessionmanager-bundle/NOTICE | ||
cp ${GO_SPACE}/THIRD-PARTY ${GO_SPACE}/bin/darwin_${ARCH}_plugin/sessionmanager-bundle/THIRD-PARTY | ||
cp ${GO_SPACE}/README.md ${GO_SPACE}/bin/darwin_${ARCH}_plugin/sessionmanager-bundle/README.md | ||
cp ${GO_SPACE}/RELEASENOTES.md ${GO_SPACE}/bin/darwin_${ARCH}_plugin/sessionmanager-bundle/RELEASENOTES.md | ||
cp ${GO_SPACE}/VERSION ${GO_SPACE}/bin/darwin_${ARCH}_plugin/sessionmanager-bundle/VERSION | ||
cp ${GO_SPACE}/bin/darwin_${ARCH}_plugin/session-manager-plugin ${GO_SPACE}/bin/darwin_${ARCH}_plugin/sessionmanager-bundle/bin/session-manager-plugin | ||
cp ${GO_SPACE}/seelog_unix.xml ${GO_SPACE}/bin/darwin_${ARCH}_plugin/sessionmanager-bundle/seelog.xml.template | ||
|
||
echo "Copying install script" | ||
|
||
cp ${GO_SPACE}/Tools/src/darwin/install ${GO_SPACE}/bin/darwin_amd64_plugin/sessionmanager-bundle/install | ||
chmod 755 ${GO_SPACE}/bin/darwin_amd64_plugin/sessionmanager-bundle/install; | ||
cp ${GO_SPACE}/Tools/src/darwin/install ${GO_SPACE}/bin/darwin_${ARCH}_plugin/sessionmanager-bundle/install | ||
chmod 755 ${GO_SPACE}/bin/darwin_${ARCH}_plugin/sessionmanager-bundle/install; | ||
|
||
cd ${GO_SPACE}/bin/darwin_amd64_plugin/sessionmanager-bundle/bin/; strip --strip-unneeded session-manager-plugin; cd ~- | ||
cd ${GO_SPACE}/bin/darwin_${ARCH}_plugin/sessionmanager-bundle/bin/; strip --strip-unneeded session-manager-plugin; cd ~- | ||
|
||
echo "Creating the bundle zip file" | ||
|
||
if [ -f ${GO_SPACE}/bin/darwin_amd64_plugin/sessionmanager-bundle.zip ] | ||
if [ -f ${GO_SPACE}/bin/darwin_${ARCH}_plugin/sessionmanager-bundle.zip ] | ||
then | ||
rm ${GO_SPACE}/bin/darwin_amd64_plugin/sessionmanager-bundle.zip | ||
rm ${GO_SPACE}/bin/darwin_${ARCH}_plugin/sessionmanager-bundle.zip | ||
fi | ||
|
||
cd ${GO_SPACE}/bin/darwin_amd64_plugin; | ||
zip -r ${GO_SPACE}/bin/darwin_amd64_plugin/sessionmanager-bundle.zip ./sessionmanager-bundle | ||
cd ${GO_SPACE}/bin/darwin_${ARCH}_plugin; | ||
zip -r ${GO_SPACE}/bin/darwin_${ARCH}_plugin/sessionmanager-bundle.zip ./sessionmanager-bundle |
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
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
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
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
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think
go:build
isn't added until 1.17.Any reason not to upgrade to latest go version (which also removes the
+build
lines)?