Skip to content

Commit

Permalink
chore: Add script to download updated ssm plugin for each arch
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreZiviani committed Mar 13, 2024
1 parent ceb6574 commit 0762156
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions internal/ssm_plugin/update_assets.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#!/bin/bash -e

TMP=$(mktemp --directory)

# Windows
pushd $TMP
wget https://s3.amazonaws.com/session-manager-downloads/plugin/latest/windows/SessionManagerPlugin.zip
unzip SessionManagerPlugin.zip
unzip package.zip

popd
cp $TMP/bin/session-manager-plugin.exe assets/plugin/windows_amd64
rm -rf $TMP/*

# Mac AMD64
pushd $TMP
wget https://s3.amazonaws.com/session-manager-downloads/plugin/latest/mac/sessionmanager-bundle.zip
unzip sessionmanager-bundle.zip

popd
cp $TMP/sessionmanager-bundle/bin/session-manager-plugin assets/plugin/darwin_amd64
rm -rf $TMP/*

# Mac ARM
pushd $TMP
wget https://s3.amazonaws.com/session-manager-downloads/plugin/latest/mac_arm64/sessionmanager-bundle.zip
unzip sessionmanager-bundle.zip

popd
cp $TMP/sessionmanager-bundle/bin/session-manager-plugin assets/plugin/darwin_arm64
rm -rf $TMP/*

# Linux AMD64
pushd $TMP
wget https://s3.amazonaws.com/session-manager-downloads/plugin/latest/ubuntu_64bit/session-manager-plugin.deb
dpkg-deb -x session-manager-plugin.deb .

popd
cp $TMP/usr/local/sessionmanagerplugin/bin/session-manager-plugin assets/plugin/linux_amd64
rm -rf $TMP/*

# Linux ARM64
pushd $TMP
wget https://s3.amazonaws.com/session-manager-downloads/plugin/latest/ubuntu_arm64/session-manager-plugin.deb
dpkg-deb -x session-manager-plugin.deb .

popd
cp $TMP/usr/local/sessionmanagerplugin/bin/session-manager-plugin assets/plugin/linux_arm64
rm -rf $TMP/*

0 comments on commit 0762156

Please sign in to comment.