Skip to content

Commit

Permalink
Merge branch 'v3' into v3-staging
Browse files Browse the repository at this point in the history
Conflicts:
	docs/_ext/aws/templates/api_reference
	docs/_ext/aws/templates/client_intro
	docs/_snippets/iterators-intro.txt
	docs/_snippets/models-intro.txt
	docs/_snippets/performing-operations.txt
	docs/_snippets/waiters-intro.txt
	docs/configuration.rst
	docs/credentials.rst
	docs/feature-commands.rst
	docs/feature-dynamodb-session-handler.rst
	docs/feature-iterators.rst
	docs/feature-models.rst
	docs/feature-waiters.rst
	docs/installation.rst
	docs/migration-guide.rst
	docs/performance.rst
	docs/quick-start.rst
	docs/service-autoscaling.rst
	docs/service-cloudformation.rst
	docs/service-cloudfront-20120505.rst
	docs/service-cloudfront.rst
	docs/service-cloudsearch.rst
	docs/service-cloudtrail.rst
	docs/service-cloudwatch.rst
	docs/service-datapipeline.rst
	docs/service-directconnect.rst
	docs/service-dynamodb-20111205.rst
	docs/service-dynamodb.rst
	docs/service-ec2.rst
	docs/service-elasticache.rst
	docs/service-elasticbeanstalk.rst
	docs/service-elasticloadbalancing.rst
	docs/service-elastictranscoder.rst
	docs/service-emr.rst
	docs/service-glacier.rst
	docs/service-iam.rst
	docs/service-importexport.rst
	docs/service-kinesis.rst
	docs/service-opsworks.rst
	docs/service-rds.rst
	docs/service-redshift.rst
	docs/service-route53.rst
	docs/service-s3.rst
	docs/service-ses.rst
	docs/service-sns.rst
	docs/service-sqs.rst
	docs/service-storagegateway.rst
	docs/service-sts.rst
	docs/service-support.rst
	docs/service-swf.rst
	docs/side-by-side.rst
	phpunit.functional.xml.dist
	src/Aws/AutoScaling/AutoScalingClient.php
	src/Aws/AutoScaling/Resources/autoscaling-2011-01-01.php
	src/Aws/CloudFormation/CloudFormationClient.php
	src/Aws/CloudFormation/Resources/cloudformation-2010-05-15.php
	src/Aws/CloudFront/CloudFrontClient.php
	src/Aws/CloudFront/CloudFrontSignature.php
	src/Aws/CloudFront/Resources/cloudfront-2014-11-06.php
	src/Aws/CloudHsm/Exception/CloudHsmException.php
	src/Aws/CloudSearch/CloudSearchClient.php
	src/Aws/CloudSearch/Enum/IndexFieldType.php
	src/Aws/CloudSearch/Enum/OptionState.php
	src/Aws/CloudTrail/CloudTrailClient.php
	src/Aws/CloudTrail/Resources/cloudtrail-2013-11-01.php
	src/Aws/CloudWatch/CloudWatchClient.php
	src/Aws/Common/Aws.php
	src/Aws/Common/Client/AbstractClient.php
	src/Aws/Common/Client/ClientBuilder.php
	src/Aws/Common/Client/DefaultClient.php
	src/Aws/Common/Client/ExpiredCredentialsChecker.php
	src/Aws/Common/Client/UploadBodyListener.php
	src/Aws/Common/Command/AwsQueryVisitor.php
	src/Aws/Common/Credentials/Credentials.php
	src/Aws/Common/Credentials/RefreshableInstanceProfileCredentials.php
	src/Aws/Common/Enum/ClientOptions.php
	src/Aws/Common/Enum/Region.php
	src/Aws/Common/Exception/Parser/DefaultXmlExceptionParser.php
	src/Aws/Common/Exception/Parser/JsonQueryExceptionParser.php
	src/Aws/Common/Exception/ServiceResponseException.php
	src/Aws/Common/Facade/Facade.php
	src/Aws/Common/Facade/FacadeInterface.php
	src/Aws/Common/Hash/HashUtils.php
	src/Aws/Common/Model/MultipartUpload/AbstractUploadBuilder.php
	src/Aws/Common/Resources/aws-config.php
	src/Aws/Common/Signature/AbstractSignature.php
	src/Aws/Common/Signature/SignatureInterface.php
	src/Aws/Common/Signature/SignatureListener.php
	src/Aws/Common/Signature/SignatureV4.php
	src/Aws/DataPipeline/DataPipelineClient.php
	src/Aws/DataPipeline/Resources/datapipeline-2012-10-29.php
	src/Aws/DirectConnect/DirectConnectClient.php
	src/Aws/DynamoDb/DynamoDbClient.php
	src/Aws/DynamoDb/Iterator/ItemIterator.php
	src/Aws/DynamoDb/Model/Attribute.php
	src/Aws/DynamoDb/Model/BatchRequest/PutRequest.php
	src/Aws/DynamoDb/Model/BatchRequest/WriteRequestBatch.php
	src/Aws/DynamoDb/Model/BatchRequest/WriteRequestBatchTransfer.php
	src/Aws/DynamoDb/Model/Item.php
	src/Aws/DynamoDb/Resources/dynamodb-2012-08-10.php
	src/Aws/Ec2/Ec2Client.php
	src/Aws/Ec2/Enum/InstanceType.php
	src/Aws/Ec2/Resources/ec2-2015-04-15.php
	src/Aws/ElastiCache/ElastiCacheClient.php
	src/Aws/ElastiCache/Exception/CacheClusterAlreadyExistsException.php
	src/Aws/ElastiCache/Exception/ReservedCacheNodeAlreadyExistsException.php
	src/Aws/ElastiCache/Resources/elasticache-2015-02-02.php
	src/Aws/ElasticBeanstalk/ElasticBeanstalkClient.php
	src/Aws/ElasticBeanstalk/Resources/elasticbeanstalk-2010-12-01.php
	src/Aws/ElasticLoadBalancing/ElasticLoadBalancingClient.php
	src/Aws/ElasticLoadBalancing/Resources/elasticloadbalancing-2012-06-01.php
	src/Aws/ElasticTranscoder/ElasticTranscoderClient.php
	src/Aws/ElasticTranscoder/Resources/elastictranscoder-2012-09-25.php
	src/Aws/Emr/EmrClient.php
	src/Aws/Emr/Resources/emr-2009-03-31.php
	src/Aws/Glacier/GlacierClient.php
	src/Aws/Glacier/GlacierUploadListener.php
	src/Aws/Glacier/Model/MultipartUpload/AbstractTransfer.php
	src/Aws/Glacier/Model/MultipartUpload/ParallelTransfer.php
	src/Aws/Glacier/Model/MultipartUpload/SerialTransfer.php
	src/Aws/Glacier/Model/MultipartUpload/TransferState.php
	src/Aws/Glacier/Model/MultipartUpload/UploadBuilder.php
	src/Aws/Glacier/Model/MultipartUpload/UploadPartContext.php
	src/Aws/Glacier/Resources/glacier-2012-06-01.php
	src/Aws/Iam/IamClient.php
	src/Aws/Iam/Resources/iam-2010-05-08.php
	src/Aws/ImportExport/ImportExportClient.php
	src/Aws/ImportExport/JobManifestListener.php
	src/Aws/ImportExport/Resources/importexport-2010-06-01.php
	src/Aws/Kinesis/KinesisClient.php
	src/Aws/Kinesis/Resources/kinesis-2013-12-02.php
	src/Aws/OpsWorks/OpsWorksClient.php
	src/Aws/OpsWorks/Resources/opsworks-2013-02-18.php
	src/Aws/Rds/RdsClient.php
	src/Aws/Rds/Resources/rds-2014-10-31.php
	src/Aws/Redshift/Exception/AuthorizationQuotaExceededException.php
	src/Aws/Redshift/Exception/InvalidClusterSecurityGroupStateException.php
	src/Aws/Redshift/Exception/InvalidClusterSnapshotStateException.php
	src/Aws/Redshift/Exception/UnsupportedOptionException.php
	src/Aws/Redshift/RedshiftClient.php
	src/Aws/Redshift/Resources/redshift-2012-12-01.php
	src/Aws/Route53/Resources/route53-2013-04-01.php
	src/Aws/Route53/Route53Client.php
	src/Aws/S3/AcpListener.php
	src/Aws/S3/BucketStyleListener.php
	src/Aws/S3/Exception/NoSuchTagSetException.php
	src/Aws/S3/Model/Acp.php
	src/Aws/S3/Model/AcpBuilder.php
	src/Aws/S3/Model/ClearBucket.php
	src/Aws/S3/Model/DeleteObjectsBatch.php
	src/Aws/S3/Model/DeleteObjectsTransfer.php
	src/Aws/S3/Model/Grant.php
	src/Aws/S3/Model/Grantee.php
	src/Aws/S3/Model/MultipartUpload/AbstractTransfer.php
	src/Aws/S3/Model/MultipartUpload/ParallelTransfer.php
	src/Aws/S3/Model/MultipartUpload/SerialTransfer.php
	src/Aws/S3/Model/MultipartUpload/UploadBuilder.php
	src/Aws/S3/Model/PostObject.php
	src/Aws/S3/Resources/s3-2006-03-01.php
	src/Aws/S3/ResumableDownload.php
	src/Aws/S3/S3Client.php
	src/Aws/S3/S3Md5Listener.php
	src/Aws/S3/S3Signature.php
	src/Aws/S3/S3SignatureInterface.php
	src/Aws/S3/S3SignatureV4.php
	src/Aws/S3/SocketTimeoutChecker.php
	src/Aws/S3/StreamWrapper.php
	src/Aws/S3/Sync/AbstractSyncBuilder.php
	src/Aws/S3/Sync/ChangedFilesIterator.php
	src/Aws/S3/Sync/DownloadSyncBuilder.php
	src/Aws/S3/Sync/UploadSync.php
	src/Aws/S3/Sync/UploadSyncBuilder.php
	src/Aws/Ses/Resources/ses-2010-12-01.php
	src/Aws/Ses/SesClient.php
	src/Aws/SimpleDb/SimpleDbClient.php
	src/Aws/Sns/MessageValidator/MessageValidator.php
	src/Aws/Sns/Resources/sns-2010-03-31.php
	src/Aws/Sns/SnsClient.php
	src/Aws/Sqs/QueueUrlListener.php
	src/Aws/Sqs/Resources/sqs-2012-11-05.php
	src/Aws/Sqs/SqsClient.php
	src/Aws/Ssm/Exception/SsmException.php
	src/Aws/StorageGateway/Resources/storagegateway-2013-06-30.php
	src/Aws/StorageGateway/StorageGatewayClient.php
	src/Aws/Sts/Resources/sts-2011-06-15.php
	src/Aws/Sts/StsClient.php
	src/Aws/Support/Resources/support-2013-04-15.php
	src/Aws/Support/SupportClient.php
	src/Aws/Swf/Resources/swf-2012-01-25.php
	src/Aws/Swf/SwfClient.php
	test_services.dist.json
	tests/Aws/Tests/CloudSearch/CloudSearchClientTest.php
	tests/Aws/Tests/CloudSearch/Integration/IntegrationTest.php
	tests/Aws/Tests/CloudTrail/Integration/IntegrationTest.php
	tests/Aws/Tests/Common/Client/AbstractClientTest.php
	tests/Aws/Tests/Common/Client/ClientBuilderTest.php
	tests/Aws/Tests/Common/Client/DefaultClientTest.php
	tests/Aws/Tests/Common/Command/AwsQueryVisitorTest.php
	tests/Aws/Tests/Common/Command/XmlResponseLocationVisitorTest.php
	tests/Aws/Tests/Common/Credentials/CredentialsTest.php
	tests/Aws/Tests/Common/Credentials/RefreshableInstanceProfileCredentialsIntegrationTest.php
	tests/Aws/Tests/Common/Credentials/RefreshableInstanceProfileCredentialsTest.php
	tests/Aws/Tests/Common/InstanceMetadata/InstanceMetadataClientTest.php
	tests/Aws/Tests/Common/Integration/ClientIntegrationTest.php
	tests/Aws/Tests/Common/Signature/SignatureListenerTest.php
	tests/Aws/Tests/Common/Signature/SignatureV4Test.php
	tests/Aws/Tests/Common/Signature/aws4_testsuite/get-space.authz
	tests/Aws/Tests/Common/Signature/aws4_testsuite/get-space.creq
	tests/Aws/Tests/Common/Signature/aws4_testsuite/get-space.sreq
	tests/Aws/Tests/Common/Signature/aws4_testsuite/get-space.sts
	tests/Aws/Tests/Common/Signature/aws4_testsuite/get-utf8.authz
	tests/Aws/Tests/Common/Signature/aws4_testsuite/get-utf8.creq
	tests/Aws/Tests/Common/Signature/aws4_testsuite/get-utf8.sts
	tests/Aws/Tests/DirectConnect/Integration/IntegrationTest.php
	tests/Aws/Tests/DynamoDb/Integration/DynamoDb_20111205_Test.php
	tests/Aws/Tests/DynamoDb/Integration/DynamoDb_20120810_Test.php
	tests/Aws/Tests/DynamoDb/Integration/WriteRequestBatch_20111205_Test.php
	tests/Aws/Tests/DynamoDb/Integration/WriteRequestBatch_20120810_Test.php
	tests/Aws/Tests/DynamoDb/Model/BatchRequest/PutRequestTest.php
	tests/Aws/Tests/DynamoDb/Model/BatchRequest/WriteRequestBatchTransferTest.php
	tests/Aws/Tests/Ec2/Ec2ClientTest.php
	tests/Aws/Tests/Ec2/Integration/BasicOperationsTest.php
	tests/Aws/Tests/IntegrationTestCase.php
	tests/Aws/Tests/Redshift/Integration/IntegrationTest.php
	tests/Aws/Tests/S3/BucketStyleListenerTest.php
	tests/Aws/Tests/S3/Integration/IntegrationTest.php
	tests/Aws/Tests/S3/Integration/S3_20060301_Test.php
	tests/Aws/Tests/S3/Integration/StreamWrapperTest.php
	tests/Aws/Tests/S3/Model/MultipartUpload/UploadBuilderTest.php
	tests/Aws/Tests/S3/Model/PostObjectTest.php
	tests/Aws/Tests/S3/S3ClientTest.php
	tests/Aws/Tests/S3/S3SignatureTest.php
	tests/Aws/Tests/S3/S3SignatureV4Test.php
	tests/Aws/Tests/S3/SocketTimeoutCheckerTest.php
	tests/Aws/Tests/S3/StreamWrapperTest.php
	tests/Aws/Tests/S3/Sync/AbstractSyncTest.php
	tests/Aws/Tests/S3/Sync/ChangedFilesIteratorTest.php
	tests/Aws/Tests/S3/Sync/DownloadSyncBuilderTest.php
	tests/Aws/Tests/S3/Sync/DownloadSyncTest.php
	tests/Aws/Tests/S3/Sync/UploadSyncTest.php
	tests/Aws/Tests/Ses/Integration/IntegrationTest.php
	tests/Aws/Tests/Sns/MessageValidator/MessageValidatorTest.php
	tests/Aws/Tests/Sts/StsClientTest.php
	tests/mock/metadata/iam_security_credentials_webapp
  • Loading branch information
mtdowling committed May 27, 2015
2 parents 399c2f7 + 935f696 commit a0b7e27
Show file tree
Hide file tree
Showing 1,982 changed files with 185,555 additions and 191,375 deletions.
3 changes: 1 addition & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ compatibility-test.php export-ignore
composer.lock export-ignore
CONTRIBUTING.md export-ignore
Makefile export-ignore
phpunit.functional.xml.dist export-ignore
phpunit.xml.dist export-ignore
README.md export-ignore
test_services.dist.json export-ignore
UPGRADING.md export-ignore
src/data/*.docs.json export-ignore
20 changes: 13 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
language: php

php:
- 5.3
- 5.4
- 5.5
- 5.6
- 7.0
- hhvm

before_script:
- sh -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm" ] && [ $(php -r "echo PHP_MINOR_VERSION;") -le 4 ]; then echo "extension = apc.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi;'
- composer self-update
- composer install --no-interaction --prefer-source --dev
sudo: false

script: vendor/bin/phpunit
env:
- COMPOSER_OPTS=""
- COMPOSER_OPTS="--prefer-lowest"

matrix:
allow_failures:
- php: hhvm
- php: 7
fast_finish: true

install:
- export AWS_ACCESS_KEY_ID=foo
- export AWS_SECRET_ACCESS_KEY=bar
- travis_retry composer update $COMPOSER_OPTS --no-interaction --prefer-source

script: make test
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,16 @@ for details about any changes you may need to make to your code for this upgrade
* Added support for configuring push synchronization to the Cognito Sync client.
* Updated docblocks in a few S3 and Glacier classes to improve IDE experience.

## 3.0.0-beta.1 - 2014-10-14

* New requirements on Guzzle 5 and PHP 5.5.
* Event system now uses Guzzle 5 events and no longer utilizes Symfony2.
* `version` and `region` are noww required parameter for each client
constructor. You can op-into using the latest version of a service by
setting `version` to `latest`.
* Removed `Aws\S3\ResumableDownload`.
* More information to follow.

## 2.7.2 - 2014-10-23

* Updated AWS Identity and Access Management (IAM) to the latest version.
Expand Down
102 changes: 33 additions & 69 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,80 +1,44 @@
# Contributing to the AWS SDK for PHP

We work hard to provide a high-quality and useful SDK, and we greatly value feedback and contributions from our
community. Whether it's a new feature, correction, or additional documentation, we welcome your pull requests.
Please submit any [issues][] or [pull requests][pull-requests] through GitHub.

## What you should keep in mind

1. The SDK is released under the [Apache license][license]. Any code you submit will be released under that license. For
substantial contributions, we may ask you to sign a [Contributor License Agreement (CLA)][cla].
2. We follow the [PSR-0][], [PSR-1][], and [PSR-2][] recommendations from the [PHP Framework Interop Group][php-fig].
Please submit code that follows these standards. The [PHP CS Fixer][cs-fixer] tool can be helpful for formatting your
code.
3. We maintain a high percentage of code coverage in our unit tests. If you make changes to the code, please add,
update, and/or remove unit (and integration) tests as appropriate.
4. We may choose not to accept pull requests that change service descriptions (e.g., files like
`src/Aws/OpsWorks/Resources/opsworks-2013-02-18.php`). We generate these files based on our internal knowledge of
the AWS services. If there is something incorrect with or missing from a service description, it may be more
appropriate to [submit an issue][issues]. We *will*, however, consider pull requests affecting service descriptions,
if the changes are related to **Iterator** or **Waiter** configurations (e.g. [PR #84][pr-84]).
5. If your code does not conform to the PSR standards or does not include adequate tests, we may ask you to update your
pull requests before we accept them. We also reserve the right to deny any pull requests that do not align with our
standards or goals.
6. If you would like to implement support for a significant feature that is not yet available in the SDK, please talk to
us beforehand to avoid any duplication of effort.

## What we are looking for

We are open to anything that improves the SDK and doesn't unnecessarily cause backwards-incompatible changes. If you are
unsure if your idea is something we would be open to, please ask us (open a ticket, send us an email, post on the
forums, etc.) Specifically, here are a few things that we would appreciate help on:

1. **Waiters** – Waiter configurations are located in the service descriptions. You can also create concrete waiters
within the `Aws\*\Waiter` namespace of a service if the logic of the waiter absolutely cannot be defined using waiter
configuration. There are many waiters that we currently provide, but many that we do not. Please let us know if you
have any questions about creating waiter configurations.
2. **Docs** – Our [User Guide][user-guide] is an ongoing project, and we would greatly appreciate contributions. The
docs are written as a [Sphinx][] website using [reStructuredText][] (very similar to Markdown). The User Guide is
located in the `docs` directory of this repository. Please see the [User Guide README][docs-readme] for more
information about how to build the User Guide.
3. **Tests** – We maintain high code coverage, but if there are any tests you feel are missing, please add them.
4. **Convenience features** – Are there any features you feel would add value to the SDK (e.g., batching for SES, SNS
message verification, S3 stream wrapper, etc.)? Contributions in this area would be greatly appreciated.
5. **Third-party modules** – We have modules published for [Silex](mod-silex), [Laravel 4](mod-laravel), and [Zend
Framework 2][mod-zf2]. Please let us know if you are interested in creating integrations with other frameworks. We
would be happy to help.
6. If you have some other ideas, please let us know!

## Running the unit tests

The AWS SDK for PHP is unit tested using PHPUnit. You can run the unit tests of the SDK after copying
phpunit.xml.dist to phpunit.xml:

cp phpunit.xml.dist phpunit.xml

Next, you need to install the dependencies of the SDK using Composer:

composer.phar install

Now you're ready to run the unit tests using PHPUnit:

vendor/bin/phpunit
We work hard to provide a high-quality and useful SDK for our AWS services, and
we greatly value feedback and contributions from our community. Please submit
your [issues][] or [pull requests][pull-requests] through GitHub.

## Things to keep in mind

1. The SDK is released under the [Apache license][license]. Any code you submit
will be released under that license. For substantial contributions, we may
ask you to sign a [Contributor License Agreement (CLA)][cla].
1. We follow all of the relevant PSR recommendations from the [PHP Framework
Interop Group][php-fig]. Please submit code that follows these standards.
The [PHP CS Fixer][cs-fixer] tool can be helpful for formatting your code.
1. We maintain a high percentage of code coverage in our unit tests. If you make
changes to the code, please add, update, and/or remove tests as appropriate.
1. We may choose not to accept pull requests that change files in the `src/data`
directory, since we generate these files based on our internal knowledge of
the AWS services. Please check in with us ahead of time if you find a mistake
or missing feature that would affect those files.
1. If your code does not conform to the PSR standards or does not include
adequate tests, we may ask you to update your pull requests before we accept
them. We also reserve the right to deny any pull requests that do not align
with our standards or goals.
1. If you would like to implement support for a significant feature that is not
yet available in the SDK, please talk to us beforehand to avoid any
duplication of effort.
1. We greatly appreciate contributions to our User Guide. The docs are written
as a [Sphinx][] website formatted with [reStructuredText][] (very similar to
Markdown). The User Guide is located in the `docs` directory of this
repository. Please see the [docs README][docs-readme] for more information
about how to build the User Guide.
1. If you are working on the SDK, make sure to check out the `Makefile` for some
of the common tasks that we have to do.

[issues]: https://github.com/aws/aws-sdk-php/issues
[pull-requests]: https://github.com/aws/aws-sdk-php/pulls
[license]: http://aws.amazon.com/apache2.0/
[cla]: http://en.wikipedia.org/wiki/Contributor_License_Agreement
[psr-0]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md
[psr-1]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-1-basic-coding-standard.md
[psr-2]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md
[cla]: https://github.com/aws/aws-cla/blob/master/amazon-single-contribution-license.txt
[php-fig]: http://php-fig.org
[cs-fixer]: http://cs.sensiolabs.org/
[user-guide]: http://docs.aws.amazon.com/aws-sdk-php/guide/latest/index.html
[sphinx]: http://sphinx-doc.org/
[restructuredtext]: http://sphinx-doc.org/rest.html
[docs-readme]: https://github.com/aws/aws-sdk-php/blob/master/docs/README.md
[mod-silex]: https://github.com/aws/aws-sdk-php-silex
[mod-laravel]: https://github.com/aws/aws-sdk-php-laravel
[mod-zf2]: https://github.com/aws/aws-sdk-php-zf2
[pr-84]: https://github.com/aws/aws-sdk-php/pull/84
98 changes: 72 additions & 26 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,50 +1,94 @@
all: clean coverage docs
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " clean to delete all Makefile artifacts"
@echo " clear-cache to clear the cached JSON compiled SDK files"
@echo " test to perform unit tests. Provide TEST to perform a specific test."
@echo " coverage to perform unit tests with code coverage. Provide TEST to perform a specific test."
@echo " coverage-show to show the code coverage report"
@echo " integ to run integration tests. Provide TEST to perform a specific test."
@echo " guide to build the user guide documentation"
@echo " guide-show to view the user guide"
@echo " api to build the API documentation"
@echo " api-show to view the API documentation"
@echo " api-package to build the API documentation as a ZIP"
@echo " api-manifest to build an API manifest JSON file for the SDK"
@echo " package to package a phar and zip file for a release"
@echo " check-tag to ensure that the TAG argument was passed"
@echo " tag to chag tag a release based on the changelog. Must provide a TAG"
@echo " release to package the release and push it to GitHub. Must provide a TAG"
@echo " full-release to tag, package, and release the SDK. Provide TAG"

clean: clear-cache
rm -rf build/artifacts/*
cd docs && make clean

clear-cache:
php build/aws-clear-cache.php

test:
vendor/bin/phpunit $(TEST)
@AWS_ACCESS_KEY_ID=foo AWS_SECRET_ACCESS_KEY=bar \
vendor/bin/phpunit --testsuite=unit $(TEST)

coverage:
vendor/bin/phpunit --coverage-html=build/artifacts/coverage $(TEST)

integ:
vendor/bin/phpunit -c phpunit.functional.xml $(TEST)
@AWS_ACCESS_KEY_ID=foo AWS_SECRET_ACCESS_KEY=bar \
vendor/bin/phpunit --testsuite=unit --coverage-html=build/artifacts/coverage $(TEST)

view-coverage:
coverage-show:
open build/artifacts/coverage/index.html

clean:
rm -rf build/artifacts
cd docs && make clean
integ:
vendor/bin/phpunit --debug --testsuite=integ $(TEST)

# Packages the phar and zip
package:
time php build/packager.php $(SERVICE)

docs:
guide:
cd docs && make html

view-docs:
guide-show:
open docs/_build/html/index.html

# Packages the phar and zip
package: burgomaster
time php build/packager.php

# Downloads a copy of Burgomaster
burgomaster:
api-get-apigen:
mkdir -p build/artifacts
curl -s https://raw.githubusercontent.com/mtdowling/Burgomaster/0.0.2/src/Burgomaster.php > build/artifacts/Burgomaster.php
[ -f build/artifacts/apigen.phar ] || wget -q -O build/artifacts/apigen.phar https://github.com/ApiGen/ApiGen/releases/download/v4.1.0/apigen-4.1.0.phar

api: api-get-apigen
# Build the package if necessary.
[ -d build/artifacts/staging ] || make package
# Delete a previously built API build to avoid the prompt.
rm -rf build/artifacts/docs
php build/artifacts/apigen.phar generate --config build/docs/apigen.neon --debug
make api-models

api-models:
# Build custom docs
php build/docs.php

api-show:
open build/artifacts/docs/build/index.html

api-package:
zip -r build/artifacts/aws-docs-api.zip build/artifacts/docs/build

api-manifest:
php build/build-manifest.php
make clear-cache

# Ensures that the TAG variable was passed to the make command
check_tag:
check-tag:
$(if $(TAG),,$(error TAG is not defined. Pass via "make tag TAG=4.2.1"))

# Creates a release but does not push it. This task updates the changelog
# with the TAG environment variable, replaces the VERSION constant, ensures
# that the source is still valid after updating, commits the changelog and
# updated VERSION constant, creates an annotated git tag using chag, and
# prints out a diff of the last commit.
tag: check_tag
tag: check-tag
@echo Tagging $(TAG)
chag update $(TAG)
sed -i '' -e "s/VERSION = '.*'/VERSION = '$(TAG)'/" src/Aws/Common/Aws.php
php -l src/Aws/Common/Aws.php
sed -i '' -e "s/VERSION = '.*'/VERSION = '$(TAG)'/" src/Sdk.php
php -l src/Sdk.php
git commit -a -m '$(TAG) release'
chag tag
@echo "Release has been created. Push using 'make release'"
Expand All @@ -57,12 +101,14 @@ tag: check_tag
# "make release" to push a release. This task requires that the
# OAUTH_TOKEN environment variable is available and the token has permission
# to push to the repository.
release: check_tag package
git push origin master
release: check-tag package
git push origin v3
git push origin $(TAG)
php build/gh-release.php $(TAG)

# Tags the repo and publishes a release.
full_release: tag release

.PHONY: docs burgomaster
.PHONY: help clean test coverage coverage-show integ package \
guide guide-show api-get-apigen api api-show api-package api-manifest \
check-tag tag release full-release clear-cache
Loading

0 comments on commit a0b7e27

Please sign in to comment.