├── .gitignore ├── index.html ├── README.md ├── config.php ├── run.php ├── COPYING └── run.sh /.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !run.php 3 | !run.sh 4 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 |

AG Branch review tool

3 |

Please click here to setup the tool

4 | 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # file-reuse-review 2 | 3 | Relates to http://github.com/wmde/file-reuse 4 | 5 | Running this tool requires you to have downloaded a composer.phar into the root of this repo! 6 | 7 | Can currently be found at http://tools.wmflabs.org/addshore-dev/ag/ 8 | -------------------------------------------------------------------------------- /config.php: -------------------------------------------------------------------------------- 1 | true, 4 | 'swiftmailer.transport' => Swift_SendmailTransport::newInstance('/usr/sbin/sendmail -bs'), 5 | 'feedback_email' => 'lizenzhinweisgenerator@wikimedia.de', // the email address that receives the feedback 6 | ]; 7 | -------------------------------------------------------------------------------- /run.php: -------------------------------------------------------------------------------- 1 | "; 3 | $message = shell_exec( __DIR__ . '/run.sh' ); 4 | if( $message === null ) { 5 | echo "

Something went wrong!

"; 6 | } else { 7 | echo "

All updated!

"; 8 | } 9 | echo ""; 10 | 11 | echo file_get_contents( __DIR__ . '/index.html' ); 12 | -------------------------------------------------------------------------------- /COPYING: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or 4 | distribute this software, either in source code form or as a compiled 5 | binary, for any purpose, commercial or non-commercial, and by any 6 | means. 7 | 8 | In jurisdictions that recognize copyright laws, the author or authors 9 | of this software dedicate any and all copyright interest in the 10 | software to the public domain. We make this dedication for the benefit 11 | of the public at large and to the detriment of our heirs and 12 | successors. We intend this dedication to be an overt act of 13 | relinquishment in perpetuity of all present and future rights to this 14 | software under copyright law. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | For more information, please refer to 25 | -------------------------------------------------------------------------------- /run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | RemoteRepo="git://github.com/wmde/Lizenzverweisgenerator.git" 4 | MainDirectory="master" 5 | Date=`date +%Y-%m-%d:%H:%M:%S` 6 | 7 | # Pull master 8 | 9 | echo -e "\e[33m==== Updating test directory ====" 10 | 11 | if [ ! -d "$MainDirectory" ]; then 12 | echo "Main directory '$MainDirectory' does not exist!" 13 | git clone $RemoteRepo master 14 | cd ./master/backend && ./../../composer.phar install && cd ./../.. 15 | else 16 | echo "Main directory '$MainDirectory' exists!" 17 | fi 18 | 19 | # Fetch most recent stuff 20 | git -C master fetch --all --prune 21 | git -C master reset --hard origin/master 22 | cd ./master/backend && ./../../composer.phar update && cd ./../.. 23 | cd ./master && npm i && npm run build && cd ./.. 24 | cp ./config.php ./master/backend/config.php 25 | 26 | # Checkout all branches 27 | 28 | for ref in $(git -C master for-each-ref --format='%(refname)' refs/remotes/origin); do 29 | ref=${ref:20} 30 | 31 | if [ "$ref" != "HEAD" ] && [ "$ref" != "master" ] && [ "$ref" != "cf-history-back" ]; then 32 | echo -e "\e[33m== Syncing $ref ==" 33 | 34 | if [ ! -d "$ref" ]; then 35 | echo "Copying whole master repo dir to branch dir" 36 | cp -r ./master ./$ref 37 | cp -r ./master/.git ./$ref/.git 38 | else 39 | echo "Copying git dir to branch dir" 40 | rm -rf ./$ref/.git 41 | cp -r ./master/.git ./$ref/.git 42 | fi 43 | 44 | git -C $ref checkout -f origin/$ref 45 | cd ./$ref/backend && ./../../composer.phar update && cd ./../.. 46 | cd ./$ref && npm i && npm run build && cd ./.. 47 | fi 48 | 49 | done 50 | 51 | # Make some index page 52 | 53 | rm index.html 54 | cp /dev/null index.html 55 | echo '' >> index.html 56 | echo '

AG Branch review tool

' >> index.html 57 | echo '

See https://lizenzhinweisgenerator.de/

' >> index.html 58 | echo '

Please select a branch to review from below:

' >> index.html 59 | echo '' >> index.html 69 | echo "

Last updated on: $Date UTC

" >> index.html 70 | # echo '

You can update these copies by clicking here

' >> index.html 71 | echo '' >> index.html 72 | --------------------------------------------------------------------------------