Skip to content

Commit

Permalink
Always append current version to compiled output (or pass explicitly)
Browse files Browse the repository at this point in the history
  • Loading branch information
clue committed Jul 19, 2017
1 parent 23a1baa commit 94e3182
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Original file line Diff line number Diff line change
@@ -1,2 +1,2 @@
/vendor/ /vendor/
/leproxy.out.php /leproxy-*.php
3 changes: 2 additions & 1 deletion compile.php
Original file line number Original file line Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php <?php


$out = 'leproxy.out.php'; // use first argument as output file or use "leproxy-{version}.php"
$out = isset($argv[1]) ? $argv[1] : ('leproxy-' . exec('git describe --always --dirty || echo dev') . '.php');


system('composer install --no-dev --classmap-authoritative'); system('composer install --no-dev --classmap-authoritative');
$classes = require __DIR__ . '/vendor/composer/autoload_classmap.php'; $classes = require __DIR__ . '/vendor/composer/autoload_classmap.php';
Expand Down
3 changes: 2 additions & 1 deletion tests/acceptance.sh
Original file line number Original file line Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash #!/bin/bash


bin=$(test -f leproxy.out.php && echo leproxy.out.php || echo leproxy.php) # test against first argument or search first file matching "leproxy*.php"
bin=${1:-$(ls -b leproxy*.php | head -n1 || echo leproxy.php)}
echo "Testing $bin" echo "Testing $bin"


# test command line arguments # test command line arguments
Expand Down

0 comments on commit 94e3182

Please sign in to comment.