Skip to content

Commit 6b8f44e

Browse files
authored
Merge pull request #9 from AnoshanJ/feat/doc-improvements-0.8
Improve version replacement regex
2 parents c6ce62e + 6c955a0 commit 6b8f44e

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

documentation/Makefile

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,7 @@ endif
6464
echo "Replacing version placeholders in versioned docs..."; \
6565
DOCKER_TAG_NO_V=$$(echo $(DOCKER_TAG) | sed 's/^v//'); \
6666
find ./versioned_docs/version-$(VERSION) -type f \( -name "*.md" -o -name "*.mdx" \) ! -name "_constants.md" -exec \
67-
$(SED_INPLACE) "s/v0\.0\.0-dev/$(DOCKER_TAG)/g" {} \;; \
68-
find ./versioned_docs/version-$(VERSION) -type f \( -name "*.md" -o -name "*.mdx" \) ! -name "_constants.md" -exec \
69-
$(SED_INPLACE) "s/\([^v]\)0\.0\.0-dev/\1$$DOCKER_TAG_NO_V/g" {} \;; \
67+
$(SED_INPLACE) "s/v0\.0\.0-dev/$(DOCKER_TAG)/g; s/0\.0\.0-dev/$$DOCKER_TAG_NO_V/g" {} \;; \
7068
$(SED_INPLACE) "s/latestVersion: '.*'/latestVersion: '$(VERSION)'/" docs/_constants.md; \
7169
$(SED_INPLACE) "s/quickStartDockerTag: '.*'/quickStartDockerTag: '$(DOCKER_TAG)'/" docs/_constants.md; \
7270
echo "✓ Version $(VERSION) created successfully!"; \
@@ -98,9 +96,7 @@ endif
9896
@echo "Replacing version placeholders in versioned docs..."
9997
@DOCKER_TAG_NO_V=$$(echo $(DOCKER_TAG) | sed 's/^v//'); \
10098
find ./versioned_docs/version-$(VERSION) -type f \( -name "*.md" -o -name "*.mdx" \) ! -name "_constants.md" -exec \
101-
$(SED_INPLACE) "s/v0\.0\.0-dev/$(DOCKER_TAG)/g" {} \;; \
102-
find ./versioned_docs/version-$(VERSION) -type f \( -name "*.md" -o -name "*.mdx" \) ! -name "_constants.md" -exec \
103-
$(SED_INPLACE) "s/\([^v]\)0\.0\.0-dev/\1$$DOCKER_TAG_NO_V/g" {} \;
99+
$(SED_INPLACE) "s/v0\.0\.0-dev/$(DOCKER_TAG)/g; s/0\.0\.0-dev/$$DOCKER_TAG_NO_V/g" {} \;
104100
@$(SED_INPLACE) "s/latestVersion: '.*'/latestVersion: '$(VERSION)'/" docs/_constants.md
105101
@$(SED_INPLACE) "s/quickStartDockerTag: '.*'/quickStartDockerTag: '$(DOCKER_TAG)'/" docs/_constants.md
106102
@echo "✓ Version $(VERSION) updated successfully!"

0 commit comments

Comments
 (0)