Skip to content

Commit

Permalink
update plugin syntax (#401)
Browse files Browse the repository at this point in the history
Co-authored-by: mvallillo <mvallillo@microsoft.com>
  • Loading branch information
vachillo and mvallillo authored Sep 20, 2022
1 parent 6b0d4e0 commit b487fc2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ installfilesdev
.uptodate

# allocator compiled plugin
kubectl-gameserver-allocate
kubectl-gameserver
9 changes: 6 additions & 3 deletions cmd/allocator/build-plugin.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#!/usr/bin/env bash
CURR_PATH="$(dirname "$BASH_SOURCE")"
CURR_PATH="$(cd "$(dirname "$BASH_SOURCE")"; pwd)"
go build -o $CURR_PATH $CURR_PATH/main.go
mv $CURR_PATH/command-line-arguments $CURR_PATH/kubectl-gameserver-allocate
export PATH=$PATH:"$(cd $CURR_PATH; pwd)"
mv $CURR_PATH/command-line-arguments $CURR_PATH/kubectl-gameserver
BASH_RC="$(cat ~/.bashrc)"
if ! [[ $BASH_RC =~ "$CURR_PATH" ]]; then
echo "export PATH=\"\$PATH:"$CURR_PATH"\"" >> ~/.bashrc
fi
kubectl plugin list

0 comments on commit b487fc2

Please sign in to comment.