From 11f98feab3fd523688c74c7a4250896f01ebae00 Mon Sep 17 00:00:00 2001 From: RanolP Date: Sat, 27 Apr 2024 22:04:57 +0900 Subject: [PATCH] ci: chk sed --- .github/workflows/follow-up.yaml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/follow-up.yaml b/.github/workflows/follow-up.yaml index 224251f..2d36315 100644 --- a/.github/workflows/follow-up.yaml +++ b/.github/workflows/follow-up.yaml @@ -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;