Alpha (#4)
* chore: initial push to be able to work together * chore: add missing wait folder * chore: add missing folders * chore: cleanup alpha branch * feat: mssql alpha instance (#2) * fix: remove unused attribute types and functions from backup models * fix: update API client references to use sqlserverflexalpha package * fix: update package references to use sqlserverflexalpha and modify user data source model * fix: add sqlserverflexalpha user data source to provider * fix: add sqlserverflexalpha user resource and update related functionality * chore: add stackit_sqlserverflexalpha_user resource and instance_id variable * fix: refactor sqlserverflexalpha user resource and enhance schema with status and default_database --------- Co-authored-by: Andre Harms <andre.harms@stackit.cloud> Co-authored-by: Marcel S. Henselin <marcel.henselin@stackit.cloud> * feat: add sqlserver instance * chore: fixing tests * chore: update docs --------- Co-authored-by: Marcel S. Henselin <marcel.henselin@stackit.cloud> Co-authored-by: Andre Harms <andre.harms@stackit.cloud>
This commit is contained in:
parent
45073a716b
commit
2733834fc9
351 changed files with 62744 additions and 3 deletions
59
scripts/replace.sh
Executable file
59
scripts/replace.sh
Executable file
|
|
@ -0,0 +1,59 @@
|
|||
#!/usr/bin/env bash
|
||||
# Copyright (c) STACKIT
|
||||
|
||||
# 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue