Skip to content

Commit 54ebc03

Browse files
authored
feat: auto update ipfs version in installation docs (#1081)
1 parent 1aff741 commit 54ebc03

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

.github/actions/update-on-new-ipfs-tag/entrypoint.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,15 @@ else
2525
make
2626
http-api-docs > $API_FILE
2727

28+
# update installation docs
29+
cd $ROOT # go back to root of ipfs-docs repo
30+
CURRENT_IPFS_NUMBER=${CURRENT_IPFS_TAG:1}
31+
LATEST_IPFS_NUMBER=${LATEST_IPFS_TAG:1}
32+
while read -r file; do
33+
echo "replacing $CURRENT_IPFS_NUMBER with $LATEST_IPFS_NUMBER in $file"
34+
sed -E -i "s/$CURRENT_IPFS_NUMBER/$LATEST_IPFS_NUMBER/g" $file
35+
done <<< "$(grep "current-ipfs-version" ./docs -R --files-with-matches)"
36+
2837
# update cli docs
2938
cd $ROOT # go back to root of ipfs-docs repo
3039
git clone https://github.com/ipfs/go-ipfs.git

.github/workflows/update-on-new-ipfs-tag.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ jobs:
2525
github_token: ${{ secrets.GITHUB_TOKEN }}
2626
source_branch: ${{ steps.update.outputs.updated_branch }}
2727
destination_branch: "main"
28-
pr_title: "Bump CLI and HTTP API reference to go-ipfs ${{ steps.latest_ipfs.outputs.latest_tag }}"
28+
pr_title: "Bump references to go-ipfs ${{ steps.latest_ipfs.outputs.latest_tag }}"
2929
pr_body: "Release Notes: https://github.com/ipfs/go-ipfs/releases/${{ steps.latest_ipfs.outputs.latest_tag }}"
3030
pr_label: "needs/triage,P0"

docs/install/command-line.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: Command-line
33
description: Using IPFS through the command-line allows you to do everything that IPFS Desktop can do, but at a more granular level since you can specify which commands to run. Learn how to install it here.
4+
current-ipfs-version: v0.12.0
45
---
56

67
# Command-line

0 commit comments

Comments
 (0)