-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: autosupport Build Changes (#541)
* feat: autosupport Build Changes * feat: pass platform as argument for asup * feat: pass platform as argument for asup * feat: pass platform as argument for asup * feat: address review comments
- Loading branch information
1 parent
276fc08
commit 5eefa40
Showing
8 changed files
with
64 additions
and
27 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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
|
||
if [ $# -ne 3 ]; then | ||
echo "You need to provide ASUP_BIN, ASUP_BINARY_VERSION and BIN_PLATFORM as arguments" | ||
exit 1 | ||
fi | ||
|
||
ASUP_BIN_DIR=$(pwd)/"$1" | ||
ASUP_BIN_VERSION="$2" | ||
BIN_PLATFORM="$3" | ||
mkdir -p "$ASUP_BIN_DIR" | ||
|
||
COUNT_REPO_FOLDERS=($(find $ASUP_BIN_DIR/github.com/!net!app -mindepth 1 -maxdepth 1 -type d | wc -l)) | ||
if [ $COUNT_REPO_FOLDERS -gt 5 ]; then | ||
rm -rf $ASUP_BIN_DIR/* | ||
fi | ||
GOMODCACHE=$ASUP_BIN_DIR go mod download github.com/NetApp/harvest-metrics@"$ASUP_BIN_VERSION" | ||
mod_bin=$(find "$ASUP_BIN_DIR" -name "*asup*" -name "*$BIN_PLATFORM*" -exec ls -t {} + | head -n 1) | ||
if [ -n "${mod_bin}" ]; then | ||
cp -f "$mod_bin" ./autosupport/asup | ||
chmod +x ./autosupport/asup | ||
chmod -R +rw "$ASUP_BIN_DIR/github.com/" | ||
fi |
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
Binary file not shown.
Binary file not shown.
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