diff --git a/.github/workflows/follow-up.yaml b/.github/workflows/follow-up.yaml index 2d36315..376e53e 100644 --- a/.github/workflows/follow-up.yaml +++ b/.github/workflows/follow-up.yaml @@ -31,11 +31,11 @@ jobs: run: npx @openapitools/openapi-generator-cli batch --clean rust.yaml - name: Update Version run: | - sed --version && - file=unofficial-documentation/tsp-output/@typespec/openapi3/openapi.yaml && - cat $file | head -n10 && - version=$(sed -rn 's/\s+version:\s*"([^"]+)"/\1/p' $file | sed -rn 's/\.0+([0-9]+)/.\1/p') && - echo New Version: $version && + file=unofficial-documentation/tsp-output/@typespec/openapi3/openapi.yaml && \ + sed -rn 's/version:(.+)/\1/p' $file && \ + sed -rn 's/\s+version:\s*"([^"]+)"/\1/p' $file && \ + version=$(sed -rn 's/\s+version:\s*"([^"]+)"/\1/p' $file | sed -rn 's/\.0+([0-9]+)/.\1/p') && \ + echo New Version: $version && \ sed -ri ":a;N;\$!ba;s/\"solvedac_api\"\nversion = \"[^\"]+\"/\"solvedac_api\"\nversion = \"$version\"/" Cargo.toml - name: Move Generated Files run: |