File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ ROOTDIR=$(git rev-parse --show-toplevel || echo ".")
66TMPDIR=/tmp
77HELM_CHART_PATH=" ${ROOTDIR} /charts/nginx-ingress"
88DEPLOYMENT_PATH=" ${ROOTDIR} /deployments"
9+ EXAMPLES_PATH=" ${ROOTDIR} /examples"
910DEBUG=${DEBUG:- " false" }
1011
1112DOCS_TO_UPDATE_FOLDER=${ROOTDIR} /docs/content
@@ -120,3 +121,19 @@ for i in ${docs_files}; do
120121 exit 2
121122 fi
122123done
124+
125+ # update examples with new versions
126+ example_files=$( find " ${EXAMPLES_PATH} " -type f -name " *.md" )
127+ for i in ${example_files} ; do
128+ if [ " ${DEBUG} " != " false" ]; then
129+ echo " Processing ${i} "
130+ fi
131+ file_name=$( basename " ${i} " )
132+ mv " ${i} " " ${TMPDIR} /${file_name} "
133+ cat " ${TMPDIR} /${file_name} " | sed -e " $regex_ic " | sed -e " $regex_helm " > " ${i} "
134+ if [ $? -ne 0 ]; then
135+ echo " ERROR: failed processing ${i} "
136+ mv " ${TMPDIR} /${file_name} " " ${i} "
137+ exit 2
138+ fi
139+ done
You can’t perform that action at this time.
0 commit comments