Skip to content

Commit

Permalink
ci: plz extract version
Browse files Browse the repository at this point in the history
  • Loading branch information
RanolP committed Apr 27, 2024
1 parent 75d1a19 commit 4b031c4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/follow-up.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ jobs:
run: npx @openapitools/openapi-generator-cli batch --clean rust.yaml
- name: Update Version
run: |
sed -ri ":a;N;\$!ba;s/\"solvedac_api\"\nversion = \"[^\"]+\"/\"solvedac_api\"\nversion = \"`sed -rn 's/^.* version: ([^\n]+).*$/\1/p' unofficial-documentation/tsp-output/@typespec/openapi3/openapi.yaml | sed -rn 's/\.0+([0-9]+)/.\1/p'`\"/" Cargo.toml
file=unofficial-documentation/tsp-output/@typespec/openapi3/openapi.yaml;
version=$(sed -rn 's/^.*version: *([^\n]+).*$/\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: |
rm -rf src;
Expand Down

0 comments on commit 4b031c4

Please sign in to comment.