Skip to content

Commit

Permalink
Update tooling scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
DRuggeri committed Mar 25, 2019
1 parent 954f5ad commit a13497c
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 9 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
main.tf
.terraform
terraform-provider-restapi
test.sh
terraform.tfstate
terraform.tfstate.backup
crash.log
Expand Down
6 changes: 6 additions & 0 deletions scripts/create-github-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ curl -o /dev/null -sH "$AUTH" $GH_REPO || { echo "Error: Invalid repo, token or
if [[ ! -f release_info.md ]];then
echo "release_info.md file does not exist. Creating it now - hit enter to continue."
read JUNK
echo "## New" > release_info.md
echo " - " >> release_info.md
echo "" >> release_info.md
echo "## Fixed" >> release_info.md
echo " - " >> release_info.md
echo "" >> release_info.md
vi release_info.md
if [[ ! -f release_info.md || -z "$(cat release_info.md)" ]];then
echo "release_info.md file does not exist or is empty. I will not proceed."
Expand Down
9 changes: 1 addition & 8 deletions scripts/do_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,7 @@ if [[ "$tag" != v* ]];then
tag="v$tag"
fi

#Make sure we are good to go
echo "Running tests..."
cd ../restapi
if ! go test;then
echo "Failed testing. Aborting."
exit 1
fi
cd -
./test.sh

#Build for all architectures we want
ARTIFACTS=()
Expand Down
12 changes: 12 additions & 0 deletions scripts/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

export GOOS=""
export GOARCH=""

echo "Running tests..."
cd ../restapi
if ! go test;then
echo "Failed testing. Aborting."
exit 1
fi
cd -

0 comments on commit a13497c

Please sign in to comment.