Skip to content

Commit

Permalink
Update pipeline_definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
swilen-iwanow committed Nov 10, 2020
1 parent ab60423 commit 89cb609
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .ci/docs-gen
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@

set -ex

binary=docforge-linux-amd64
if [[ $(uname) == 'Darwin' ]]; then
READLINK_BIN="greadlink"
binary=docforge-darwin-amd64
else
READLINK_BIN="readlink"
fi
Expand All @@ -16,13 +18,15 @@ if [[ -z "${SOURCE_PATH}" ]]; then
SOURCE_PATH="$(${READLINK_BIN} -f $(dirname ${0})/..)"
fi

if [[ ! -d "${BINARY_PATH}" ]]; then
if [[ -z "${BINARY_PATH}" ]]; then
BINARY_PATH="${SOURCE_PATH}/bin"
else
BINARY_PATH="${BINARY_PATH}/bin"
fi

if [[ ! -d "${BINARY_PATH}/rel" ]]; then
echo "${BINARY_PATH}/rel does not exist. Forgot to build the binaries before running this?"
echo "${BINARY_PATH}/rel doesn\`t exist. Forgot to build the binaries before running this?"
exit 1
fi

$BINARY_PATH/rel/docforge-linux-amd64 gen-cmd-docs -d $SOURCE_PATH/docs/cmd-ref
$BINARY_PATH/rel/${binary} gen-cmd-docs -d $SOURCE_PATH/docs/cmd-ref
2 changes: 2 additions & 0 deletions .ci/pipeline_definitions
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ docforge:
steps:
docs-gen:
image: "golang:1.14.4"
inputs:
BINARY_PATH: 'binary_path'
depends:
- build
docs-lint:
Expand Down

0 comments on commit 89cb609

Please sign in to comment.