Skip to content
This repository has been archived by the owner on Sep 10, 2024. It is now read-only.

Commit

Permalink
update script
Browse files Browse the repository at this point in the history
  • Loading branch information
zyoutz-r7 committed Dec 7, 2020
1 parent 0baff1c commit 106946b
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions setup_workspace/setup_workspace.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,15 @@
#
# Output: Generation of API and models based on Rapid7 Nexpose and InsightVM Swagger file

# NOTE: Pulling from endpoint no longer up to date; manually update version to match console prior to running
LIB_VERSION=6.6.55

# Download InsightVM/Nexpose Console Version and update package in config.json
#VERSION_URL="http://download2.rapid7.com/download/InsightVM/Rapid7Setup-Linux64.bin.version"
#CONSOLE_VERSION=$(curl $VERSION_URL)
#LIB_VERSION="$CONSOLE_VERSION"
#sed -i '' "s/\"packageVersion\": \".*\"/\"packageVersion\": \"$LIB_VERSION\"/g" ./setup_workspace/config.json
#echo "Library Version: $LIB_VERSION"
sed -i '' "s/\"packageVersion\": \".*\"/\"packageVersion\": \"$LIB_VERSION\"/g" ./setup_workspace/config.json
echo "Library Version: $LIB_VERSION"


# Environment variable for branch name
Expand All @@ -26,7 +29,6 @@
# Download swagger file
API_FILE_DIR="api-files/"
SWAGGER_FILE=$API_FILE_DIR"console-swagger.json"
#SWAGGER_URL="https://help.rapid7.com/insightvm/en-us/api/api.json"
SWAGGER_URL="https://$2:3780/api/3/json"
wget --no-check-certificate $SWAGGER_URL -O $SWAGGER_FILE

Expand Down Expand Up @@ -79,5 +81,5 @@ fi
LC_ALL=C find . -type f -not -path "./.git/*" -exec sed -i '' "s/$2:3780/localhost:3780/g" {} +

git checkout -b release/$CONSOLE_VERSION
#git add *
#git commit -a -m "Update generated library to version: $LIB_VERSION"
git add *
git commit -a -m "Update generated library to version: $LIB_VERSION"

0 comments on commit 106946b

Please sign in to comment.