mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-14 12:48:01 +00:00
chore: change build process to use local and server the same (#955)
* initital ide * init * it is alive * go test is running * wip with buildkit * it definitly alive * all done, now the github actions * pretty * before i delete the generated proto stub * delete generated code * mount of grpc does not yet work * save before * level of insanity 1000% * huhur * gh action new dockerfile * fix * fix * fix * fix * amd64 only * try caching * try with reg * test with artifact upload * trial * add comments * publish branchname * correct vars * correct id * mode max for cache * remove unused code * cleanup * test action which uploads coverage * use * proper path * debug file location * path * test if ci still works * correct docker file name
This commit is contained in:
@@ -4,38 +4,24 @@ set -eux
|
||||
|
||||
GEN_PATH=src/app/proto/generated
|
||||
|
||||
echo "Remove old files"
|
||||
rm -rf $GEN_PATH
|
||||
|
||||
echo "Create folders"
|
||||
mkdir -p $GEN_PATH
|
||||
|
||||
targetcurl () {
|
||||
mkdir -p $1 && cd $1 && { curl -O $2; cd -; }
|
||||
}
|
||||
|
||||
echo "Download additional protofiles"
|
||||
targetcurl tmp/validate https://raw.githubusercontent.com/envoyproxy/protoc-gen-validate/v0.4.0/validate/validate.proto
|
||||
targetcurl tmp/protoc-gen-swagger/options https://raw.githubusercontent.com/grpc-ecosystem/grpc-gateway/v1.14.6/protoc-gen-swagger/options/annotations.proto
|
||||
targetcurl tmp/protoc-gen-swagger/options https://raw.githubusercontent.com/grpc-ecosystem/grpc-gateway/v1.14.6/protoc-gen-swagger/options/openapiv2.proto
|
||||
|
||||
echo "Generate grpc"
|
||||
|
||||
protoc \
|
||||
-I=/usr/local/include \
|
||||
-I=../pkg/grpc/message \
|
||||
-I=../pkg/grpc/management/proto \
|
||||
-I=../pkg/grpc/auth/proto \
|
||||
-I=../pkg/grpc/admin/proto \
|
||||
-I=../internal/protoc/protoc-gen-authoption \
|
||||
-I=.tmp/protos/message \
|
||||
-I=.tmp/protos/admin/proto \
|
||||
-I=.tmp/protos/management/proto \
|
||||
-I=.tmp/protos/auth/proto \
|
||||
-I=node_modules/google-proto-files \
|
||||
-I=tmp \
|
||||
-I=.tmp/protos \
|
||||
--js_out=import_style=commonjs,binary:$GEN_PATH \
|
||||
--grpc-web_out=import_style=commonjs+dts,mode=grpcweb:$GEN_PATH \
|
||||
../pkg/grpc/message/proto/*.proto \
|
||||
../pkg/grpc/management/proto/*.proto \
|
||||
../pkg/grpc/admin/proto/*.proto \
|
||||
../pkg/grpc/auth/proto/*.proto
|
||||
.tmp/protos/message/proto/*.proto \
|
||||
.tmp/protos/admin/proto/*.proto \
|
||||
.tmp/protos/auth/proto/*.proto \
|
||||
.tmp/protos/management/proto/*.proto
|
||||
|
||||
echo "Generate annotations js file (compatibility)"
|
||||
|
||||
|
Reference in New Issue
Block a user