Skip to content
Permalink
Browse files

Always append current version to compiled output (or pass explicitly)

  • Loading branch information
clue committed Jul 19, 2017
1 parent 23a1baa commit 94e3182b19e3a4bed02ad49390ee4c1d8322b3b4
Showing with 5 additions and 3 deletions.
  1. +1 −1 .gitignore
  2. +2 −1 compile.php
  3. +2 −1 tests/acceptance.sh
@@ -1,2 +1,2 @@
/vendor/
/leproxy.out.php
/leproxy-*.php
@@ -1,6 +1,7 @@
<?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');
$classes = require __DIR__ . '/vendor/composer/autoload_classmap.php';
@@ -1,6 +1,7 @@
#!/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"

# test command line arguments

0 comments on commit 94e3182

Please sign in to comment.
You can’t perform that action at this time.