Skip to content

Commit c483cb2

Browse files
authored
Merge pull request #226 from liangyuanpeng/gatewayapi
gateway-api: bump version to 1.0 and add a script for update.
2 parents ee03122 + 2f37471 commit c483cb2

16 files changed

+11053
-1442
lines changed

gateway-api/kcl.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "gateway-api"
33
edition = "0.0.1"
4-
version = "0.1.0"
4+
version = "0.2.0"
55

66
[dependencies]
77
k8s = "1.28"

gateway-api/update.sh

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#!/bin/bash
2+
3+
set -o errexit
4+
set -o nounset
5+
set -eoux pipefail
6+
7+
VERSION="v1.1.0"
8+
9+
rm -rf gateway-api
10+
git clone https://github.com/kubernetes-sigs/gateway-api.git -b ${VERSION} --depth=1
11+
12+
for API in gateway-api/config/crd/standard/*
13+
do
14+
if [ "$(basename "${API}")" = "kustomization.yaml" ];then
15+
continue
16+
fi
17+
kcl-openapi generate model --crd -f $API --skip-validation -t standard
18+
done
19+
20+
for API in gateway-api/config/crd/experimental/*
21+
do
22+
if [ "$(basename "${API}")" = "kustomization.yaml" ];then
23+
continue
24+
fi
25+
kcl-openapi generate model --crd -f $API --skip-validation -t experimental
26+
done
27+
28+
rm -rf standard/models/k8s
29+
rm -rf experimental/models/k8s
30+
31+
mkdir -p v1 v1alpha2 v1beta1
32+
33+
mv standard/models/*_v1_*.k v1/ || true
34+
mv standard/models/*_v1alpha2_*.k v1alpha2/ || true
35+
mv standard/models/*_v1beta1_*.k v1beta1/ || true
36+
37+
mv experimental/models/*_v1_*.k v1/ || true
38+
mv experimental/models/*_v1alpha2_*.k v1alpha2/ || true
39+
mv experimental/models/*_v1beta1_*.k v1beta1/ || true
40+
41+
rm -rf standard
42+
rm -rf experimental
43+
rm -rf gateway-api

0 commit comments

Comments
 (0)