update travis config (#32)
This commit is contained in:
parent
97a9e8b27c
commit
e62591895d
62
.travis.yml
62
.travis.yml
@ -17,8 +17,38 @@ env:
|
|||||||
|
|
||||||
stages:
|
stages:
|
||||||
- test
|
- test
|
||||||
|
- deploy
|
||||||
|
|
||||||
|
before_install:
|
||||||
|
- export LAST_TAG=`git describe --abbrev=0 --tags`
|
||||||
|
- export CURRENT_VERSION=v`cat VERSION`
|
||||||
|
|
||||||
|
before_script:
|
||||||
|
- bash bin/install.sh
|
||||||
|
|
||||||
|
script: make ci
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
allow_failures:
|
||||||
|
- if: fork = true
|
||||||
|
env: BRANCH=2.0.2
|
||||||
|
- if: fork = true
|
||||||
|
env: BRANCH=2.0.4
|
||||||
|
- if: fork = true
|
||||||
|
env: BRANCH=2.0.5
|
||||||
|
- if: fork = true
|
||||||
|
env: BRANCH=2.0.6
|
||||||
|
- if: fork = true
|
||||||
|
env: BRANCH=2.0.7
|
||||||
|
- if: fork = true
|
||||||
|
env: BRANCH=2.0.8
|
||||||
|
- if: fork = true
|
||||||
|
env: BRANCH=2.0.9
|
||||||
|
- if: fork = true
|
||||||
|
env: BRANCH=2.0.10
|
||||||
|
- if: fork = true
|
||||||
|
env: BRANCH=2.0.11
|
||||||
|
|
||||||
include:
|
include:
|
||||||
- php: 7.0
|
- php: 7.0
|
||||||
env: BRANCH=2.0.2
|
env: BRANCH=2.0.2
|
||||||
@ -215,16 +245,22 @@ jobs:
|
|||||||
- php: 7.3
|
- php: 7.3
|
||||||
env: BRANCH=2.3.4
|
env: BRANCH=2.3.4
|
||||||
|
|
||||||
before_script:
|
- stage: deploy
|
||||||
- bash bin/install.sh
|
before_script: skip
|
||||||
|
script: make build_archive
|
||||||
script: make ci
|
before_deploy:
|
||||||
|
- export VERSION=`cat VERSION`
|
||||||
# deploy:
|
- export ARCHIVE_NAME=/tmp/retailcrm-retailcrm-$VERSION.zip
|
||||||
# skip_cleanup: true
|
- git config --local user.name "retailCRM"
|
||||||
# provider: script
|
- git config --local user.email "support@retailcrm.ru"
|
||||||
# script: make
|
- export TRAVIS_TAG=v$VERSION
|
||||||
# on:
|
- git tag $TRAVIS_TAG
|
||||||
# php: 7.2
|
deploy:
|
||||||
# branch: master
|
provider: releases
|
||||||
# condition: "$DEPLOY = true"
|
token: $GITHUB_OAUTH_TOKEN
|
||||||
|
cleanup: false
|
||||||
|
file: $ARCHIVE_NAME
|
||||||
|
on:
|
||||||
|
condition: "$LAST_TAG != $CURRENT_VERSION"
|
||||||
|
if: branch = master AND type = push AND fork = false
|
||||||
|
after_deploy: make delete_archive
|
||||||
|
5
Makefile
5
Makefile
@ -3,14 +3,11 @@ VERSION = `cat $(FILE)`
|
|||||||
ARCHIVE_NAME = '/tmp/retailcrm-retailcrm-'$(VERSION)'.zip'
|
ARCHIVE_NAME = '/tmp/retailcrm-retailcrm-'$(VERSION)'.zip'
|
||||||
MAGE_ROOT = $(TRAVIS_BUILD_DIR)/../magento2
|
MAGE_ROOT = $(TRAVIS_BUILD_DIR)/../magento2
|
||||||
|
|
||||||
all: build_archive send_to_ftp delete_archive
|
.PHONY: build_archive delete_archive
|
||||||
|
|
||||||
build_archive:
|
build_archive:
|
||||||
cd src; zip -r $(ARCHIVE_NAME) ./*
|
cd src; zip -r $(ARCHIVE_NAME) ./*
|
||||||
|
|
||||||
send_to_ftp:
|
|
||||||
curl -T $(ARCHIVE_NAME) -u $(FTP_USER):$(FTP_PASSWORD) ftp://$(FTP_HOST)
|
|
||||||
|
|
||||||
delete_archive:
|
delete_archive:
|
||||||
rm -f $(ARCHIVE_NAME)
|
rm -f $(ARCHIVE_NAME)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user