File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ set -e
4+
5+ if ! which jazzy > /dev/null; then
6+ echo " Error: Jazzy not installed, see https://github.com/realm/Jazzy or run 'gem install jazzy' to install it"
7+ exit 1
8+ fi
9+
10+ if ! which jq > /dev/null; then
11+ echo " Error: jq not installed, run 'brew install jq' to install it"
12+ exit 1
13+ fi
14+
15+ read -p ' Enter release tag (without quotes): ' RELEASE_TAG
16+
17+ AUTHOR_NAME=" Pusher Limited"
18+ AUTHOR_URL=" https://pusher.com"
19+ GITHUB_ORIGIN=$( git remote get-url origin)
20+ GITHUB_URL=${GITHUB_ORIGIN% " .git" }
21+ MODULE_NAME=$( swift package dump-package | jq --raw-output ' .name' )
22+
23+ echo " Generating public API docs from release tag $RELEASE_TAG "
24+
25+ # The 'arch -x86_64' command is redundant on Intel Macs, and runs Jazzy under Rosetta 2 on Apple Silicon Macs for compatibility
26+ arch -x86_64 jazzy \
27+ --module $MODULE_NAME \
28+ --module_version $RELEASE_TAG \
29+ --swift-build-tool spm \
30+ --author $AUTHOR_NAME \
31+ --author_url $AUTHOR_URL \
32+ --github_url $GITHUB_URL \
33+ --github-file-prefix $GITHUB_URL /tree/$RELEASE_TAG
You can’t perform that action at this time.
0 commit comments