Added build and package scripts
This commit is contained in:
parent
eefe53a438
commit
8c6f7c1e93
2
.gitignore
vendored
2
.gitignore
vendored
@ -2,7 +2,5 @@
|
|||||||
/vendor
|
/vendor
|
||||||
/.phpunit.cache
|
/.phpunit.cache
|
||||||
/*.phar
|
/*.phar
|
||||||
/.spark
|
|
||||||
/.spark.json
|
|
||||||
/src/version
|
/src/version
|
||||||
/release
|
/release
|
||||||
|
33
.spark/package.sh
Executable file
33
.spark/package.sh
Executable file
@ -0,0 +1,33 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
VERSION="$(git describe --tags)"
|
||||||
|
PATH="$PWD/tools:$PATH"
|
||||||
|
|
||||||
|
if [ -z "$VERSION" ]; then
|
||||||
|
echo "Could not parse version from git"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkdir -p release/$VERSION
|
||||||
|
|
||||||
|
pharlite
|
||||||
|
|
||||||
|
cp spark.phar release/$VERSION/spark.phar
|
||||||
|
cp README.md release/$VERSION/README.md
|
||||||
|
cp CHANGELOG.md release/$VERSION/CHANGELOG.md
|
||||||
|
7z a -tzip "release/$VERSION/spark-$VERSION-dist.zip" spark.phar plugins README.md CHANGELOG.md
|
||||||
|
tar cvfz "release/$VERSION/spark-$VERSION-dist.tgz" spark.phar plugins README.md CHANGELOG.md
|
||||||
|
7z a -tzip "release/$VERSION/spark-$VERSION-src.zip" bin src runtime plugins composer.json README.md CHANGELOG.md
|
||||||
|
tar cvfz "release/$VERSION/spark-$VERSION-src.tgz" bin src runtime plugins composer.json README.md CHANGELOG.md
|
||||||
|
|
||||||
|
test -d release/tmp && rm -rf release/tmp
|
||||||
|
mkdir release/tmp
|
||||||
|
cp -R spark.phar plugins README.md CHANGELOG.md release/tmp/
|
||||||
|
pushd release/tmp
|
||||||
|
makeself . ../$VERSION/spark-$VERSION-dist.run "Spark $VERSION" ./spark.phar install
|
||||||
|
popd
|
||||||
|
rm -rf release/tmp
|
||||||
|
|
||||||
|
echo -e "\e[1m[release/$VERSION]\e[0m"
|
||||||
|
ls -hl release/$VERSION
|
||||||
|
|
0
.spark/plugins/.gitkeep
Normal file
0
.spark/plugins/.gitkeep
Normal file
11
.spark/spark.json
Normal file
11
.spark/spark.json
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"preload": [
|
||||||
|
".spark/plugins/*"
|
||||||
|
],
|
||||||
|
"scripts": {
|
||||||
|
"build": [
|
||||||
|
".spark/update-version.sh",
|
||||||
|
".spark/package.sh"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
12
.spark/update-version.sh
Executable file
12
.spark/update-version.sh
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
VERSION="$(git describe --tags)"
|
||||||
|
|
||||||
|
if [ -z "$VERSION" ]; then
|
||||||
|
echo "Could not parse version from git"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo -e "<?php define(\"APP_VERSION\", \"$VERSION\");" > src/version
|
||||||
|
echo "[Version: $VERSION]"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user