chore: empty main branch
This commit is contained in:
parent
459122c88e
commit
45073a716b
721 changed files with 0 additions and 135552 deletions
|
|
@ -1,21 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# This script is used to ensure for PRs the docs are up-to-date via the CI pipeline
|
||||
# Usage: ./check-docs.sh
|
||||
set -eo pipefail
|
||||
|
||||
ROOT_DIR=$(git rev-parse --show-toplevel)
|
||||
|
||||
before_hash=$(find docs -type f -exec sha256sum {} \; | sort | sha256sum | awk '{print $1}')
|
||||
|
||||
# re-generate the docs
|
||||
$ROOT_DIR/scripts/tfplugindocs.sh
|
||||
|
||||
after_hash=$(find docs -type f -exec sha256sum {} \; | sort | sha256sum | awk '{print $1}')
|
||||
|
||||
if [[ "$before_hash" == "$after_hash" ]]; then
|
||||
echo "Docs are up-to-date"
|
||||
else
|
||||
echo "Changes detected. Docs are *not* up-to-date."
|
||||
exit 1
|
||||
fi
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
#!/usr/bin/env 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}
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
#!/usr/bin/env 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.62.0
|
||||
go install github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs@v0.21.0
|
||||
else
|
||||
echo "Invalid action: '$action', please use $0 help for help"
|
||||
fi
|
||||
|
|
@ -1,57 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
# Add replace directives to local files to go.work
|
||||
set -eo pipefail
|
||||
|
||||
while getopts "s:" option; do
|
||||
case "${option}" in
|
||||
s)
|
||||
SDK_DIR=${OPTARG}
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "call: $0 [-s sdk-dir] <apis*>"
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
shift $((OPTIND-1))
|
||||
|
||||
if [ -z "$SDK_DIR" ]; then
|
||||
SDK_DIR=../stackit-sdk-generator/sdk-repo-updated
|
||||
echo "No SDK_DIR set, using $SDK_DIR"
|
||||
fi
|
||||
|
||||
|
||||
if [ ! -f go.work ]; then
|
||||
go work init
|
||||
go work use .
|
||||
else
|
||||
echo "go.work already exists"
|
||||
fi
|
||||
|
||||
if [ $# -gt 0 ];then
|
||||
# modules passed via commandline
|
||||
for service in $*; do
|
||||
if [ ! -d $SDK_DIR/services/$service ]; then
|
||||
echo "service directory $SDK_DIR/services/$service does not exist"
|
||||
exit 1
|
||||
fi
|
||||
echo "replacing selected service $service"
|
||||
if [ "$service" = "core" ]; then
|
||||
go work edit -replace github.com/stackitcloud/stackit-sdk-go/core=$SDK_DIR/core
|
||||
else
|
||||
go work edit -replace github.com/stackitcloud/stackit-sdk-go/services/$service=$SDK_DIR/services/$service
|
||||
fi
|
||||
done
|
||||
else
|
||||
# replace all modules
|
||||
echo "replacing all services"
|
||||
go work edit -replace github.com/stackitcloud/stackit-sdk-go/core=$SDK_DIR/core
|
||||
for n in $(find ${SDK_DIR}/services -name go.mod);do
|
||||
service=$(dirname $n)
|
||||
service=${service#${SDK_DIR}/services/}
|
||||
go work edit -replace github.com/stackitcloud/stackit-sdk-go/services/$service=$(dirname $n)
|
||||
done
|
||||
fi
|
||||
go work edit -fmt
|
||||
go work sync
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
#!/usr/bin/env 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