Skip to content

Commit

Permalink
re-add docs build script
Browse files Browse the repository at this point in the history
  • Loading branch information
eli-darkly committed Aug 7, 2021
1 parent 0c54b17 commit 047a199
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ composer.phar
.php_cs.cache
composer.lock
docs/build
docs/.phpdoc
phpunit/
.phpunit.result.cache
9 changes: 9 additions & 0 deletions .ldrelease/build-docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

# This script assumes that it is running in a Docker container using the image
# "ldcircleci/php-sdk-release", defined in https://github.com/launchdarkly/sdks-ci-docker

set -e

cd docs
make
3 changes: 2 additions & 1 deletion .ldrelease/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ publications:

circleci:
linux:
image: ldcircleci/ld-php-sdk-release:1 # built in sdks-ci-docker project, contains PHP 7.2 + phpDocumentor
image: ldcircleci/php-sdk-release:1 # built in sdks-ci-docker project, contains PHP 7.3 + phpDocumentor

documentation:
githubPages: true
title: LaunchDarkly PHP SDK phpredis integration
12 changes: 12 additions & 0 deletions .ldrelease/publish-docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

set -e

# Releaser will publish the docs to GitHub pages for us if we put a "docs.zip" artifact in ./artifacts

mkdir -p artifacts
pushd docs/build/html
rm -f docs.zip
zip -r docs.zip *
popd
mv docs/build/html/docs.zip artifacts
14 changes: 14 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

SOURCE_DIR = $(shell cd .. && pwd)
PHPDOCUMENTOR = php $(LDTOOLS_DIR)/php/phpDocumentor.phar

.PHONY: html

html:
rm -rf build/temp build/html
$(PHPDOCUMENTOR) \
-d $(SOURCE_DIR)/src \
-t build/html \
--visibility public \
--defaultpackagename "SDK" \
--title "${LD_RELEASE_DOCS_TITLE} ${LD_RELEASE_VERSION}"
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

use LaunchDarkly\Impl\Integrations\FeatureRequesterBase;

/**
* @internal
*/
class PHPRedisFeatureRequester extends FeatureRequesterBase
{
/** @var array */
Expand Down

0 comments on commit 047a199

Please sign in to comment.