I have this YAML file:
openapi: 3.0.0
info:
title: Test
description: >-
This is the official REST API documentation for all available routes
provided by the **Test** plugin.
version: 2.0.0
servers:
- url: https://entwicklungsumgebung
components:
securitySchemes:
basicAuth:
type: http
Inside my CI pipeline, I'm trying to modify the version at line 7. At the middle of the file, there are multiple keys named test_version
or prod_version
which should not be replaced. For this, I've written this sed
command:
sed -i '' 's/^version: .*/version: 3.0.0/' test.yml
Initially, I've not used ^
after s/
but this matched also everything before version. Now, nothing gets replaced. Any idea what I'm doing wrong?