File tree Expand file tree Collapse file tree 3 files changed +12
-6
lines changed Expand file tree Collapse file tree 3 files changed +12
-6
lines changed File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change 1- #! /bin/bash
1+ #! /usr/ bin/env bash
22
33# Author: @ralfhandl
44
55# run this script from the root of the repo. It is designed to be run by a GitHub workflow.
66
7- bash --version
7+ echo " TODO: ${BASH_VERSION} "
88
99for schemaDir in schemas/v3* ; do
1010 vVersion=$( basename " $schemaDir " )
1111 version=${vVersion: 1}
1212 echo $version
1313
14- schemas=(meta/base.schema. yaml dialect/base.schema .yaml schema.yaml schema-base.yaml)
14+ schemas=(meta. yaml dialect.yaml schema.yaml schema-base.yaml)
1515 maxDate=" -"
1616 dates=()
17+ declare -A datesHash
18+
1719 for schema in " ${schemas[@]} " ; do
1820 if [ -f " $schemaDir /$schema " ]; then
1921 lastCommitDate=$( git log -1 --format=" %ad" --date=short " $schemaDir /$schema " )
2022 if [ " $lastCommitDate " \> " $maxDate " ]; then
2123 maxDate=$lastCommitDate
2224 fi
2325 dates+=(" $maxDate " )
24- echo $schema $maxDate
26+ datesHash[" $schema " ]=$maxDate
27+ echo $schema $lastCommitDate " ->" $maxDate
28+ # base=$(basename "$schema" .yaml)
29+ # mkdir -p "deploy/oas/$version/$base"
2530 else
26- lastCommitDate =" -"
31+ datesHash[ " $schema " ] =" -"
2732 dates+=(" -" )
2833 fi
2934 done
3035
3136 echo " ${dates[@]} "
3237
33- # mkdir -p deploy/oas/$version/schema
38+
39+
3440 # node scripts/schema-convert.js "$filename" $lastCommitDate > deploy/oas/$version/schema/$lastCommitDate
3541 # mv deploy/oas/$version/schema/*.md deploy/oas/$version/schema/$lastCommitDate.md
3642
You can’t perform that action at this time.
0 commit comments