Bash scripts that automate common use and development tasks in ThinkUp.
autodeploy (for developers testing file changes)
Automates the process of uploading ThinkUp changes to your webserver when you're editing them locally.
autodeploy-scp- autodeploy via SCP
Set up autodeploy
autodeploy-confto match your settings
autodeployscript from thinkup root directory
generate-distribution (creates user distribution of app)
Generates a user distribution of the web application called thinkup.zip, and drops it into a thinkup/build directory.
Run this from ThinkUp's parent directory, and make sure a directory named build exists there.
migratedb (for developers changing the database)
Iterates through all database migration files (including any new ones you're testing) and generates the final
migratedb- run through all migrations start to finish and generate
Set up and run migratedb
migratedb-confto match your settings
migratedbscript from thinkup root directory
lic_header.py (pre-commit hook script for adding the license header to files)
How to test:
Install Python if necessary. (If you're using Windows, this script has been tested using Cygwin with Python and git installed.)
Copy lic_header.sample.py to a new file lic_header.py, e.g. cd extras/scripts; cp lic_header.sample.py lic_header.py
Edit lic_header.py and change the THINKUP_HOME variable appropriately
make lic_header.py executable, e.g. chmod 755 lic_header.py
Test the script by editing some existing php files, e.g. under webapps/_lib, to remove their headers. You can run the script like this from the thinkup home dir: % extras/scripts/lic_header.py
(It has a few options; call it with --help to see them)
To test the pre-commit hook part, create a file under the .git directory named .git/hooks/pre-commit, containing the following two lines:
Make this file executable (important). It will now run whenever you do a commit. If there were files updated by the script, the commit should not go through.
Windows/Cygwin troubleshooting: If you get a "fatal error - unable to remap same address as parent", here's how to fix: http://www.mylifestartingup.com/2009/04/fatal-error-unable-to-remap-to-same.html
test-pull-postback (post test results for a particular pull request back to that pull's comments on GitHub)
Given a username, branchname, and pull request ID, this script pulls a branch, runs the ThinkUp test suite, and given a valid GitHub OAuth token, posts the test results to the pull request's comments automatically. Without a GitHub OAuth token set, the script simply outputs the contents of the test results message.
Example output: https://github.com/ginatrapani/ThinkUp/pull/795
Requires: test-pull-postback-conf (see test-pull-postback-conf-sample for instructions on getting GitHub credentials)
Set up and run test-pull-postback
test-pull-postback-confto match your settings
test-pull-postbackscript from thinkup root directory