Initial commit
This commit is contained in:
commit
e4c8a6fbf4
186 changed files with 29501 additions and 0 deletions
18
scripts/lint-golangci-lint.sh
Executable file
18
scripts/lint-golangci-lint.sh
Executable file
|
|
@ -0,0 +1,18 @@
|
|||
#!/bin/bash
|
||||
# This script lints the SDK modules and the internal examples
|
||||
# Pre-requisites: golangci-lint
|
||||
set -eo pipefail
|
||||
|
||||
ROOT_DIR=$(git rev-parse --show-toplevel)
|
||||
GOLANG_CI_YAML_PATH="${ROOT_DIR}/golang-ci.yaml"
|
||||
GOLANG_CI_ARGS="--allow-parallel-runners --timeout=5m --config=${GOLANG_CI_YAML_PATH}"
|
||||
|
||||
if type -p golangci-lint >/dev/null; then
|
||||
:
|
||||
else
|
||||
echo "golangci-lint not installed, unable to proceed."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd ${ROOT_DIR}
|
||||
golangci-lint run ${GOLANG_CI_ARGS}
|
||||
23
scripts/project.sh
Executable file
23
scripts/project.sh
Executable file
|
|
@ -0,0 +1,23 @@
|
|||
#!/bin/bash
|
||||
|
||||
# This script is used to manage the project, only used for installing the required tools for now
|
||||
# Usage: ./project.sh [action]
|
||||
# * tools: Install required tools to run the project
|
||||
set -eo pipefail
|
||||
|
||||
ROOT_DIR=$(git rev-parse --show-toplevel)
|
||||
|
||||
action=$1
|
||||
|
||||
if [ "$action" = "help" ]; then
|
||||
[ -f "$0".man ] && man "$0".man || echo "No help, please read the script in ${script}, we will add help later"
|
||||
elif [ "$action" = "tools" ]; then
|
||||
cd ${ROOT_DIR}
|
||||
|
||||
go mod download
|
||||
|
||||
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.52.2
|
||||
go install github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs@v0.16.0
|
||||
else
|
||||
echo "Invalid action: '$action', please use $0 help for help"
|
||||
fi
|
||||
17
scripts/tfplugindocs.sh
Executable file
17
scripts/tfplugindocs.sh
Executable file
|
|
@ -0,0 +1,17 @@
|
|||
#!/bin/bash
|
||||
# Pre-requisites: tfplugindocs
|
||||
set -eo pipefail
|
||||
|
||||
ROOT_DIR=$(git rev-parse --show-toplevel)
|
||||
EXAMPLES_DIR="${ROOT_DIR}/examples"
|
||||
PROVIDER_NAME="stackit"
|
||||
|
||||
# Create a new empty directory for the docs
|
||||
if [ -d ${ROOT_DIR}/docs ]; then
|
||||
rm -rf ${ROOT_DIR}/docs
|
||||
fi
|
||||
mkdir -p ${ROOT_DIR}/docs
|
||||
|
||||
echo ">> Generating documentation"
|
||||
tfplugindocs generate \
|
||||
--provider-name "stackit"
|
||||
Loading…
Add table
Add a link
Reference in a new issue