diff --git a/README.md b/README.md index 7c098f3bf2f2673c49b9ec1233bec3edccceb344..4d6a006c774f699b3ae21f0040d04feface85643 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,15 @@ Click on particular boxes to see description and how to use: * [NodeJS 4.x + bower + gulp](/nodejs4) * [NodeJS 5.x + JDK + ADT + cordova](/nodejs5_jdk_adk25) +# How to rebuild + +```bash +python make.py +git add --all +git commit -m "dfdf" +git push origin master +``` + Boxes are automatically regenerated upon a push to master. If you want to develop a single box, just make a branch that starts with it's name and a dash, eg. **cassandra-something**. diff --git a/cassandra/metadata.json b/cassandra/metadata.json index 305681aba261676befa50e0cfd667a5990e5e174..24df88f82b5e0e081bb2da19b980bebeb0624544 100644 --- a/cassandra/metadata.json +++ b/cassandra/metadata.json @@ -1,15 +1,15 @@ { - "description": "", - "short_description": "Debian + Cassandra", + "description": "Debian Jessie x86_64 with Cassandra 3.0.9", + "short_description": "Debian Jessie x86_64 with Cassandra 3.0.9", "name": "henrietta/cassandra", "versions": [{ "version": "1", "status": "active", - "description_html": "<p>Debian + Cassandrat</p>", - "description_markdown": "Debian + Cassandra", + "description_html": "<p>Debian Jessie x86_64 with Cassandra 3.0.9</p>", + "description_markdown": "Debian Jessie x86_64 with Cassandra 3.0.9", "providers": [{ "name": "virtualbox", "url": "http://dev.dms-serwis.com.pl/vagrant/cassandra.box" }] }] -} \ No newline at end of file +} diff --git a/make.py b/make.py index 3c3d1afaeeb11655177b1c38b10f42c42c81f882..66ded88393fcfd7dd52acf28a4d0496cab85a9be 100644 --- a/make.py +++ b/make.py @@ -3,16 +3,19 @@ from __future__ import print_function, absolute_import, division import os import os.path +import sys if __name__ == '__main__': dirs = [dir for dir in os.listdir('.') if os.path.isdir(dir) or (dir != '.git')] exi = lambda box, sup: os.path.exists(os.path.join(box, 'build%s.sh' % (sup, ))) boxes = [box for box in dirs if exi(box, '') or exi(box, '_as_vagrant')] - # Generate Gitlab CI file - with open('.gitlab-ci.yml', 'wb') as ci: - for box in boxes: - ci.write(b''' + if len(sys.argv) == 1: + + # Generate Gitlab CI file + with open('.gitlab-ci.yml', 'wb') as ci: + for box in boxes: + ci.write(b''' build_$BOX: only: - master @@ -38,13 +41,13 @@ build_$BOX: - cd .. '''.replace('$BOX', box).replace('$PREFIX', 'henrietta/')) - # Generate metadata - for box in boxes: - with open(os.path.join(box, 'DESCRIPTION'), 'rb') as mdin: + if sys.argv[1] == 'meta': + + + with open('DESCRIPTION', 'rb') as mdin, open('metadata.json', 'wb') as mdout: description = mdin.read().strip() - with open(os.path.join(box, 'metadata.json'), 'wb') as mdout: - mdout.write('''{ + mdout.write('''{ "description": "%s", "short_description": "%s", "name": "henrietta/%s",