Skip to content

Remove migrations-php.yaml in favor of copying entire directory #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "build/php-library"]
path = build/php-library
url = https://github.com/mongodb/mongo-php-library.git
branch = master
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,24 @@ STAGING_BUCKET=docs-mongodb-org-staging
PRODUCTION_BUCKET=docs-mongodb-org-prod
PREFIX=php-library

.PHONY: help stage fake-deploy deploy
.PHONY: help publish stage fake-deploy deploy

help:
@echo 'Targets'
@echo ' help - Show this help message'
@echo ' publish - Publish docs locally'
@echo ' stage - Host online for review'
@echo ' fake-deploy - Create a fake deployment in the staging bucket'
@echo ' deploy - Deploy to the production bucket'
@echo ''
@echo 'Variables'
@echo ' ARGS - Arguments to pass to mut-publish'

publish:
git submodule update --init
rsync -a --delete build/php-library/docs/ source/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ruhroh. If you start from an empty build directory, this errors out:

~/docs-php-library(master) $make publish
rsync -a --delete build/php-library/docs/ source/
rsync: link_stat "/Users/allison/docs-php-library/build/php-library/docs/." failed: No such file or directory (2)
rsync error: some files could not be transferred (code 23) at /BuildRoot/Library/Caches/com.apple.xbs/Sources/rsync/rsync-47/rsync/main.c(992) [sender=2.6.9]

It seems to be attempting to run before the PHP Library repo is cloned to build/php-library/… Thoughts @i80and?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ehhhhh shoot I should have expected that. How do you folks feel about using git submodules instead of giza's assets system?

For example, you would run git submodule add -f -b master -- https://github.com/mongodb/mongo-php-library.git build/php-library, and then git submodule update right before the rsync

giza make publish

stage:
mut-publish build/${GIT_BRANCH}/html ${STAGING_BUCKET} --prefix=${PREFIX} --stage ${ARGS}
@echo "Hosted at ${STAGING_URL}/${PREFIX}/${USER}/${GIT_BRANCH}/index.html"
Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ the following command: ::

git clone git://github.com/mongodb/docs-php-library
cd docs-php-library/
giza make html
make publish

View ``build/html/index.html`` to view your current build of the
View ``build/master/index.html`` to view your current build of the
documentation.

If you have not installed giza, you can do so with `pip`.
Expand Down
1 change: 1 addition & 0 deletions build/php-library
Submodule php-library added at 83eb39
4 changes: 0 additions & 4 deletions config/build_conf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,10 @@ system:
- 'sphinx_local.yaml'
- 'push.yaml'
- htaccess: ['htaccess.yaml']
- migrations: 'migrations-php.yaml'
assets:
- branch: master
path: build/docs-tools
repository: http://github.com/mongodb/docs-tools.git
- branch: master
path: build/php-library # this is where we'll put the source docs (from the driver repo)
repository: https://github.com/mongodb/mongo-php-library.git
paths:
output: 'build'
source: 'source'
Expand Down
Loading