Skip to content

Commit 23dd984

Browse files
Trevörtomerd
authored andcommitted
Replace 0.0.0 default docs version with master (#22)
This is a more correct way of versioning the docs and solves an issue where some of doc links would lead to a 404 GitHub page
1 parent 44ddc8b commit 23dd984

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

scripts/generate_docs.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ set -e
1717

1818
my_path="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
1919
root_path="$my_path/.."
20-
version=$(git describe --abbrev=0 --tags || echo "0.0.0")
20+
version=$(git describe --abbrev=0 --tags || echo "master")
2121
modules=(NIOHTTPClient)
2222

2323
if [[ "$(uname -s)" == "Linux" ]]; then
@@ -51,13 +51,14 @@ fi
5151
if ! command -v jazzy > /dev/null; then
5252
gem install jazzy --no-ri --no-rdoc
5353
fi
54+
5455
module_switcher="docs/$version/README.md"
5556
jazzy_args=(--clean
5657
--author 'SwiftNIOHTTPClient team'
5758
--readme "$module_switcher"
5859
--author_url https://github.com/swift-server/swift-nio-http-client
5960
--github_url https://github.com/swift-server/swift-nio-http-client
60-
--github-file-prefix https://github.com/swift-server/swift-nio-http-client/tree/$version
61+
--github-file-prefix "https://github.com/swift-server/swift-nio-http-client/tree/$version"
6162
--theme fullwidth
6263
--xcodebuild-arguments -scheme,swift-nio-http-client-Package)
6364
cat > "$module_switcher" <<"EOF"

0 commit comments

Comments
 (0)