22 lines
521 B
Bash
Executable File
22 lines
521 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# chdir into the root from wherever we are
|
|
cd "$(dirname "$(realpath "$0")")/.."
|
|
|
|
# determine the tag and output base
|
|
TAG="$(git describe --tags)"
|
|
OUT="dist/fresh-${TAG}"
|
|
NOW="$(date +"%Y-%m-%d")"
|
|
|
|
# create output directory
|
|
mkdir -p dist
|
|
|
|
# update version.php and build the phar
|
|
echo "<?php define(\"APP_VERSION\", \"${TAG}\"); define(\"BUILD_DATE\", \"${NOW}\");" > src/version.php
|
|
tools/pharlite
|
|
#phpxmake -o "$OUT.phpx" index.php src vendor
|
|
|
|
# copy raw phar into destination
|
|
cp -v fresh.phar "$OUT.phar"
|
|
|