Commit 40dc63b9 authored by Thor Bjorgvinsson's avatar Thor Bjorgvinsson Committed by Daniel Robinson
Browse files

Adding darwin arm64 to makefile

cr: https://code.amazon.com/reviews/CR-54600632
parent c492492b
#!/usr/bin/env bash
set -e
ARCH=$1
echo "****************************************"
echo "Creating tar file for Mac OS X amd64 "
echo "Creating tar file for Mac OS X $ARCH "
echo "****************************************"
ROOTFS=${GO_SPACE}/bin/darwin_amd64/darwin
ROOTFS=${GO_SPACE}/bin/darwin_$ARCH/darwin
TAR_NAME=amazon-ssm-agent.tar.gz
DESTINATION=${GO_SPACE}/bin/amazon-ssm-agent-darwin-`cat ${GO_SPACE}/VERSION`.tar.gz
DESTINATION=${GO_SPACE}/bin/amazon-ssm-agent-darwin-$ARCH-`cat ${GO_SPACE}/VERSION`.tar.gz
rm -rf ${ROOTFS}
echo "Creating darwin folders"
......@@ -21,12 +23,12 @@ mkdir -p ${PROGRAM_FOLDER}/bin
echo "Copying application files"
cp ${GO_SPACE}/bin/darwin_amd64/amazon-ssm-agent ${PROGRAM_FOLDER}/bin/
cp ${GO_SPACE}/bin/darwin_amd64/ssm-agent-worker ${PROGRAM_FOLDER}/bin/
cp ${GO_SPACE}/bin/darwin_amd64/ssm-document-worker ${PROGRAM_FOLDER}/bin/
cp ${GO_SPACE}/bin/darwin_amd64/ssm-cli ${PROGRAM_FOLDER}/bin/
cp ${GO_SPACE}/bin/darwin_amd64/ssm-session-logger ${PROGRAM_FOLDER}/bin/
cp ${GO_SPACE}/bin/darwin_amd64/ssm-session-worker ${PROGRAM_FOLDER}/bin/
cp ${GO_SPACE}/bin/darwin_$ARCH/amazon-ssm-agent ${PROGRAM_FOLDER}/bin/
cp ${GO_SPACE}/bin/darwin_$ARCH/ssm-agent-worker ${PROGRAM_FOLDER}/bin/
cp ${GO_SPACE}/bin/darwin_$ARCH/ssm-document-worker ${PROGRAM_FOLDER}/bin/
cp ${GO_SPACE}/bin/darwin_$ARCH/ssm-cli ${PROGRAM_FOLDER}/bin/
cp ${GO_SPACE}/bin/darwin_$ARCH/ssm-session-logger ${PROGRAM_FOLDER}/bin/
cp ${GO_SPACE}/bin/darwin_$ARCH/ssm-session-worker ${PROGRAM_FOLDER}/bin/
cp ${GO_SPACE}/seelog_unix.xml ${PROGRAM_FOLDER}/seelog.xml.template
cp ${GO_SPACE}/amazon-ssm-agent.json.template ${PROGRAM_FOLDER}/
......
#!/usr/bin/env bash
cp ${GO_SPACE}/Tools/src/update/darwin/install_tar.sh ${GO_SPACE}/bin/darwin_amd64/darwin/install.sh
cp ${GO_SPACE}/Tools/src/update/darwin/uninstall.sh ${GO_SPACE}/bin/darwin_amd64/darwin/uninstall.sh
ARCH=$1
chmod 755 ${GO_SPACE}/bin/darwin_amd64/darwin/install.sh
chmod 755 ${GO_SPACE}/bin/darwin_amd64/darwin/uninstall.sh
chmod 755 ${GO_SPACE}/bin/darwin_amd64/updater
cp ${GO_SPACE}/Tools/src/update/darwin/install_tar.sh ${GO_SPACE}/bin/darwin_$ARCH/darwin/install.sh
cp ${GO_SPACE}/Tools/src/update/darwin/uninstall.sh ${GO_SPACE}/bin/darwin_$ARCH/darwin/uninstall.sh
tar -zcvf ${GO_SPACE}/bin/updates/amazon-ssm-agent/`cat ${GO_SPACE}/VERSION`/amazon-ssm-agent-darwin-amd64.tar.gz -C ${GO_SPACE}/bin/darwin_amd64/darwin/ amazon-ssm-agent.tar.gz install.sh uninstall.sh
chmod 755 ${GO_SPACE}/bin/darwin_$ARCH/darwin/install.sh
chmod 755 ${GO_SPACE}/bin/darwin_$ARCH/darwin/uninstall.sh
chmod 755 ${GO_SPACE}/bin/darwin_$ARCH/updater
tar -zcvf ${GO_SPACE}/bin/updates/amazon-ssm-agent-updater/`cat ${GO_SPACE}/VERSION`/amazon-ssm-agent-updater-darwin-amd64.tar.gz -C ${GO_SPACE}/bin/darwin_amd64/ updater
tar -zcvf ${GO_SPACE}/bin/updates/amazon-ssm-agent/`cat ${GO_SPACE}/VERSION`/amazon-ssm-agent-darwin-$ARCH.tar.gz -C ${GO_SPACE}/bin/darwin_$ARCH/darwin/ amazon-ssm-agent.tar.gz install.sh uninstall.sh
rm ${GO_SPACE}/bin/darwin_amd64/darwin/install.sh
rm ${GO_SPACE}/bin/darwin_amd64/darwin/uninstall.sh
tar -zcvf ${GO_SPACE}/bin/updates/amazon-ssm-agent-updater/`cat ${GO_SPACE}/VERSION`/amazon-ssm-agent-updater-darwin-$ARCH.tar.gz -C ${GO_SPACE}/bin/darwin_$ARCH/ updater
rm ${GO_SPACE}/bin/darwin_$ARCH/darwin/install.sh
rm ${GO_SPACE}/bin/darwin_$ARCH/darwin/uninstall.sh
......@@ -24,11 +24,11 @@ coverage:: build-linux
github.com/aws/amazon-ssm-agent/agent/... \
github.com/aws/amazon-ssm-agent/core/...
build:: build-linux build-freebsd build-windows build-linux-386 build-windows-386 build-arm build-arm64 build-darwin
build:: build-linux build-freebsd build-windows build-linux-386 build-windows-386 build-arm build-arm64 build-darwin-amd64 build-darwin-arm64
prepack:: cpy-plugins copy-win-dep prepack-linux prepack-linux-arm64 prepack-linux-386 prepack-windows prepack-windows-386
package:: create-package-folder package-linux package-windows package-darwin
package:: create-package-folder package-linux package-windows package-darwin-amd64 package-darwin-arm64
build-release:: clean quick-integtest checkstyle pre-release build prepack package finalize
......@@ -149,11 +149,17 @@ build-freebsd: GOOS=freebsd
build-freebsd: GO_BUILD=$(GO_BUILD_NOPIE)
build-freebsd: build-any-amd64-freebsd
.PHONY: build-darwin
build-darwin: GOARCH=amd64
build-darwin: GOOS=darwin
build-darwin: GO_BUILD=$(GO_BUILD_NOPIE)
build-darwin: build-any-darwin-amd64
.PHONY: build-darwin-amd64
build-darwin-amd64: GOARCH=amd64
build-darwin-amd64: GOOS=darwin
build-darwin-amd64: GO_BUILD=$(GO_BUILD_NOPIE)
build-darwin-amd64: build-any-darwin-amd64
.PHONY: build-darwin-arm64
build-darwin-arm64: GOARCH=arm64
build-darwin-arm64: GOOS=darwin
build-darwin-arm64: GO_BUILD=$(GO_BUILD_NOPIE)
build-darwin-arm64: build-any-darwin-arm64
# Production windows binaries are built using GO_BUILD_PIE
.PHONY: build-windows
......@@ -315,10 +321,15 @@ package-deb: create-package-folder
package-win: create-package-folder
$(GO_SPACE)/Tools/src/create_win.sh
.PHONY: package-darwin
package-darwin:
$(GO_SPACE)/Tools/src/create_darwin.sh
$(GO_SPACE)/Tools/src/create_darwin_package.sh
.PHONY: package-darwin-amd64
package-darwin-amd64:
$(GO_SPACE)/Tools/src/create_darwin.sh amd64
$(GO_SPACE)/Tools/src/create_darwin_package.sh amd64
.PHONY: package-darwin-arm64
package-darwin-arm64:
$(GO_SPACE)/Tools/src/create_darwin.sh arm64
$(GO_SPACE)/Tools/src/create_darwin_package.sh arm64
.PHONY: package-rpm-386
package-rpm-386: create-package-folder
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment