Skip to content

Commit

Permalink
ci: chk sed
Browse files Browse the repository at this point in the history
  • Loading branch information
RanolP committed Apr 27, 2024
1 parent 73d76aa commit 11f98fe
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/follow-up.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,12 @@ jobs:
run: npx @openapitools/openapi-generator-cli batch --clean rust.yaml
- name: Update Version
run: |
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;
sed -ri ":a;N;\$!ba;s/\"solvedac_api\"\nversion = \"[^\"]+\"/\"solvedac_api\"\nversion = \"$version\"/" Cargo.toml;
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 &&
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 11f98fe

Please sign in to comment.