diff --git a/.travis/deploy_script.sh b/.travis/deploy_script.sh
index 9a926ba2..218906d4 100755
--- a/.travis/deploy_script.sh
+++ b/.travis/deploy_script.sh
@@ -14,7 +14,7 @@ if [ "$TRAVIS" = "true" ]; then
# delete all superfluous files
echo "cleaning files"
- find . -type d -name ".git" | xargs rm -rf
+ find ./vendor -type d -name ".git" | xargs rm -rf
rm -rf .idea phpvms.iml .travis .dpl
rm -rf .phpstorm.meta.php _ide_helper.php
mv .env.dev.example .env
diff --git a/composer.json b/composer.json
index 2aec6200..c87a0b05 100755
--- a/composer.json
+++ b/composer.json
@@ -45,6 +45,7 @@
"jackiedo/timezonelist": "5.x",
"tivie/php-os-detector": "1.1.0",
"santigarcor/laratrust": "5.0.3",
+ "pragmarx/version": "0.2.1",
"nabeel/vacentral": "dev-master"
},
"require-dev": {
diff --git a/composer.lock b/composer.lock
index cfa8394b..436333c3 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
- "content-hash": "a34f3d409e7a3e41c650c2c201b3e2e7",
+ "content-hash": "b571a69e74e128cd9d50dd73cf6c8358",
"packages": [
{
"name": "composer/semver",
@@ -3261,6 +3261,127 @@
],
"time": "2017-08-03T14:08:16+00:00"
},
+ {
+ "name": "pragmarx/version",
+ "version": "v0.2.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/antonioribeiro/version.git",
+ "reference": "fd2eec365012f2f6e00a20f39e23e8efb8913ae9"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/antonioribeiro/version/zipball/fd2eec365012f2f6e00a20f39e23e8efb8913ae9",
+ "reference": "fd2eec365012f2f6e00a20f39e23e8efb8913ae9",
+ "shasum": ""
+ },
+ "require": {
+ "laravel/framework": "^5.5",
+ "php": "^7.0",
+ "pragmarx/yaml": "^0.1",
+ "symfony/process": "^3.3"
+ },
+ "require-dev": {
+ "orchestra/testbench": "^3.5",
+ "phpunit/phpunit": "^6.4"
+ },
+ "type": "library",
+ "extra": {
+ "component": "package",
+ "laravel": {
+ "providers": [
+ "PragmaRX\\Version\\Package\\ServiceProvider"
+ ],
+ "aliases": {
+ "Version": "PragmaRX\\Version\\Package\\Facade"
+ }
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "PragmaRX\\Version\\Package\\": "src/package",
+ "PragmaRX\\Version\\Tests\\": "tests/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Antonio Carlos Ribeiro",
+ "email": "acr@antoniocarlosribeiro.com",
+ "role": "Creator & Designer"
+ }
+ ],
+ "description": "Take control over your Laravel app version",
+ "keywords": [
+ "laravel",
+ "version",
+ "versioning"
+ ],
+ "time": "2017-12-02T23:56:29+00:00"
+ },
+ {
+ "name": "pragmarx/yaml",
+ "version": "v0.1.4",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/antonioribeiro/yaml.git",
+ "reference": "b510623eb5008cc468e00a31259a3c860dd2b267"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/antonioribeiro/yaml/zipball/b510623eb5008cc468e00a31259a3c860dd2b267",
+ "reference": "b510623eb5008cc468e00a31259a3c860dd2b267",
+ "shasum": ""
+ },
+ "require": {
+ "laravel/framework": "^5.5",
+ "php": "^7.0",
+ "symfony/yaml": "^3.3"
+ },
+ "require-dev": {
+ "orchestra/testbench": "^3.5",
+ "phpunit/phpunit": "^6.4"
+ },
+ "type": "library",
+ "extra": {
+ "component": "package",
+ "laravel": {
+ "providers": [
+ "PragmaRX\\Yaml\\Package\\ServiceProvider"
+ ],
+ "aliases": {
+ "Yaml": "PragmaRX\\Yaml\\Package\\Facade"
+ }
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "PragmaRX\\Yaml\\Package\\": "src/package",
+ "PragmaRX\\Yaml\\Tests\\": "tests/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Antonio Carlos Ribeiro",
+ "email": "acr@antoniocarlosribeiro.com",
+ "role": "Creator & Designer"
+ }
+ ],
+ "description": "Load your Laravel config files using yaml",
+ "keywords": [
+ "config",
+ "laravel",
+ "yaml"
+ ],
+ "time": "2017-12-05T20:32:21+00:00"
+ },
{
"name": "prettus/l5-repository",
"version": "2.6.28",
diff --git a/config/version.yml b/config/version.yml
new file mode 100644
index 00000000..9b6d6f38
--- /dev/null
+++ b/config/version.yml
@@ -0,0 +1,35 @@
+version_source: config # "config", "git-local" or "git-remote"
+current:
+ major: 7
+ minor: 0
+ patch: 0
+ format: "{$major}.{$minor}.{$patch}"
+cache:
+ enabled: true
+ key: pragmarx-version
+ time: 525600 #minutes = 1 year
+build:
+ #mode: number # "number", "git-local" or "git-remote"
+ mode: git-local # "number", "git-local" or "git-remote"
+ number: 701031
+ length: 6
+ increment_by: 1
+git:
+ #git-local: "git rev-parse --verify HEAD"
+ git-local: "git rev-parse --quiet --verify HEAD 2>/dev/null || echo VERSION"
+ git-remote: "git ls-remote {$repository}"
+ branch: "refs/heads/master"
+ repository: "{{ env('VERSION_GIT_REMOTE_REPOSITORY') }}"
+ version:
+ git-local: "git describe"
+ git-remote: "git ls-remote {$repository} | grep tags/ | grep -v {} | cut -d \/ -f 3 | sort --version-sort | tail -1"
+ matcher: "/[V|v]*[ersion]*\\s*\\.*(\\d+)\\.(\\d+)\\.(\\d+)\\.*(\\w*)/"
+format:
+ major: "{$major}"
+ minor: "{$minor}"
+ patch: "{$patch}"
+ build: "{$build}"
+ version: "{$major}.{$minor}.{$patch} (build {$build})"
+ full: "version {{'format.version'}}"
+ compact: "v{$major}.{$minor}.{$patch}-{$build}"
+ ## add as many formats as you need !!!!
diff --git a/phpvms.iml b/phpvms.iml
index 66001321..679e1708 100644
--- a/phpvms.iml
+++ b/phpvms.iml
@@ -167,6 +167,8 @@
@version
+