Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/add-mapping-version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ jobs:
add-mapping-version:
uses: ./.github/workflows/call-add-mapping-version.yaml
with:
agent-version: ${{ github.event.inputs.agent-version }}
oss-version: ${{ github.event.inputs.oss-version }}
dry-run: ${{ github.event.inputs.dry-run }}
agent-version: ${{ inputs.agent-version }}
oss-version: ${{ inputs.oss-version }}
dry-run: ${{ inputs.dry-run }}
2 changes: 1 addition & 1 deletion docs/version-mapping.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ The following shows the underlying [OSS version of Fluent Bit](https://github.co

|FluentDo Agent Version|OSS Version Base|
|----------------------|----------------|
| 25.7.1 | 4.0.3 |
| 25.7.1 | 4.0.3 |
18 changes: 18 additions & 0 deletions scripts/add-mapping-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,24 @@ MAPPING_FILE=${MAPPING_FILE:-$DOCS_DIR/version-mapping.md}
NEW_OSS_VERSION=${NEW_OSS_VERSION:?}
NEW_AGENT_VERSION=${NEW_AGENT_VERSION:?}

# Handle version string with or without a v prefix - we just want semver
if [[ "$NEW_OSS_VERSION" =~ ^v?([0-9]+\.[0-9]+\.[0-9]+)$ ]] ; then
NEW_OSS_VERSION=${BASH_REMATCH[1]}
echo "Valid OSS version string: $NEW_OSS_VERSION"
else
echo "ERROR: Invalid OSS semver string: $NEW_OSS_VERSION"
exit 1
fi

# Handle version string with or without a v prefix - we just want semver
if [[ "$NEW_AGENT_VERSION" =~ ^v?([0-9]+\.[0-9]+\.[0-9]+)$ ]] ; then
NEW_AGENT_VERSION=${BASH_REMATCH[1]}
echo "Valid FluentDo agent version string: $NEW_AGENT_VERSION"
else
echo "ERROR: Invalid FluentDo agent semver string: $NEW_AGENT_VERSION"
exit 1
fi

# Check if the mapping file exists
if [[ ! -f "$MAPPING_FILE" ]]; then
echo "ERROR: Mapping file $MAPPING_FILE does not exist."
Expand Down