Skip to content

Commit

Permalink
composer repo generator script
Browse files Browse the repository at this point in the history
  • Loading branch information
dzuelke committed Dec 10, 2015
1 parent 28b206f commit bd64bb0
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions support/mkrepo.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash

# fail hard
set -o pipefail
# fail harder
set -eux

echo "-----> Fetching manifests..."
s3cmd --ssl get s3://$S3_BUCKET/$S3_PREFIX/*.composer.json

echo "-----> Generating packages.json..."
python -c 'import sys, json; print json.dumps({"packages": [ [json.load(open(item)) for item in sys.argv[1:]] ] })' *.composer.json > packages.json

echo "-----> Done. Run 's3cmd --ssl --access_key=\$AWS_ACCESS_KEY_ID --secret_key=\$AWS_SECRET_ACCESS_KEY --acl-public put packages.json s3://$S3_BUCKET/$S3_PREFIX/packages.json' to upload repository."

0 comments on commit bd64bb0

Please sign in to comment.