Skip to content

Commit 54fb4fb

Browse files
committed
chore: change gwapi version var name in update.sh
Signed-off-by: Shane Utt <shaneutt@linux.com>
1 parent cc4d851 commit 54fb4fb

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

update.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
# ------------------------------------------------------------------------------
44
# This script will automatically generate API updates for new Gateway API
5-
# releases. Update the $VERSION to the new release version before executing.
5+
# releases. Update the $GATEWAY_API_VERSION to the new release version before
6+
# executing.
67
#
78
# This script requires kopium, which can be installed with:
89
#
@@ -13,7 +14,8 @@
1314

1415
set -eou pipefail
1516

16-
VERSION="v1.4.0"
17+
GATEWAY_API_VERSION="v1.4.0"
18+
echo "Using Gateway API version ${GATEWAY_API_VERSION}"
1719

1820
STANDARD_APIS=(
1921
gatewayclasses
@@ -53,7 +55,7 @@ echo "// WARNING! generated file do not edit" > $APIS_DIR/standard/mod.rs
5355
for API in "${STANDARD_APIS[@]}"
5456
do
5557
echo "generating standard api ${API}"
56-
curl -sSL "https://raw.githubusercontent.com/kubernetes-sigs/gateway-api/${VERSION}/config/crd/standard/gateway.networking.k8s.io_${API}.yaml" | kopium --schema=derived --derive=JsonSchema --derive=Default --derive=PartialEq --docs -f - > $APIS_DIR/standard/${API}.rs
58+
curl -sSL "https://raw.githubusercontent.com/kubernetes-sigs/gateway-api/${GATEWAY_API_VERSION}/config/crd/standard/gateway.networking.k8s.io_${API}.yaml" | kopium --schema=derived --derive=JsonSchema --derive=Default --derive=PartialEq --docs -f - > $APIS_DIR/standard/${API}.rs
5759
sed -i 's/pub use kube::CustomResource;/pub use kube_derive::CustomResource;/g' $APIS_DIR/standard/${API}.rs
5860
echo "pub mod ${API};" >> $APIS_DIR/standard/mod.rs
5961
done
@@ -99,7 +101,7 @@ echo "// WARNING! generated file do not edit" > $APIS_DIR/experimental/mod.rs
99101
for API in "${EXPERIMENTAL_APIS[@]}"
100102
do
101103
echo "generating experimental api $API"
102-
curl -sSL "https://raw.githubusercontent.com/kubernetes-sigs/gateway-api/${VERSION}/config/crd/experimental/gateway.networking.k8s.io_${API}.yaml" | kopium --schema=derived --derive=JsonSchema --derive=Default --derive=PartialEq --docs -f - > $APIS_DIR/experimental/${API}.rs
104+
curl -sSL "https://raw.githubusercontent.com/kubernetes-sigs/gateway-api/${GATEWAY_API_VERSION}/config/crd/experimental/gateway.networking.k8s.io_${API}.yaml" | kopium --schema=derived --derive=JsonSchema --derive=Default --derive=PartialEq --docs -f - > $APIS_DIR/experimental/${API}.rs
103105
sed -i 's/pub use kube::CustomResource;/pub use kube_derive::CustomResource;/g' $APIS_DIR/experimental/${API}.rs
104106
echo "pub mod ${API};" >> $APIS_DIR/experimental/mod.rs
105107
done

0 commit comments

Comments
 (0)