diff --git a/src/index.ts b/src/index.ts index 87211801..b0fd4e7a 100644 --- a/src/index.ts +++ b/src/index.ts @@ -196,7 +196,8 @@ export class CdktfProviderProject extends cdk.JsiiProject { run: [ "sed -i 's/# CDKTF prebuilt bindings for/# CDKTF Go bindings for/' .repo/dist/go/*/README.md", // @see https://stackoverflow.com/a/49511949 - "sed -i -e '/## Available Packages/,/### Go/!b' -e '/### Go/!d;p; s/### Go/## Go Package/' -e 'd' .repo/dist/go/*/README.md", + // eslint-disable-next-line prettier/prettier + `sed -i -e '/## ${isDeprecated ? 'Deprecated' : 'Available'} Packages/,/### Go/!b' -e '/### Go/!d;p; s/### Go/## Go Package/' -e 'd' .repo/dist/go/*/README.md`, // sed -e is black magic and for whatever reason the string replace doesn't work so let's try it again: // eslint-disable-next-line prettier/prettier `sed -i 's/### Go/## ${isDeprecated ? 'Deprecated' : 'Go'} Package/' .repo/dist/go/*/README.md`, diff --git a/test/__snapshots__/index.test.ts.snap b/test/__snapshots__/index.test.ts.snap index c63e6588..8f6f0fb4 100644 --- a/test/__snapshots__/index.test.ts.snap +++ b/test/__snapshots__/index.test.ts.snap @@ -811,7 +811,7 @@ jobs: - name: Remove some text from the README that doesn't apply to Go run: |- sed -i 's/# CDKTF prebuilt bindings for/# CDKTF Go bindings for/' .repo/dist/go/*/README.md - sed -i -e '/## Available Packages/,/### Go/!b' -e '/### Go/!d;p; s/### Go/## Go Package/' -e 'd' .repo/dist/go/*/README.md + sed -i -e '/## Deprecated Packages/,/### Go/!b' -e '/### Go/!d;p; s/### Go/## Go Package/' -e 'd' .repo/dist/go/*/README.md sed -i 's/### Go/## Deprecated Package/' .repo/dist/go/*/README.md sed -i -e '/API.typescript.md/,/You can also visit a hosted version/!b' -e 'd' .repo/dist/go/*/README.md sed -i 's|Find auto-generated docs for this provider here:|Find auto-generated docs for this provider [here](https://github.com/cdktf/cdktf-provider-random/blob/main/docs/API.go.md).|' .repo/dist/go/*/README.md