Skip to content
This repository has been archived by the owner on Feb 25, 2023. It is now read-only.

Commit

Permalink
add ravis
Browse files Browse the repository at this point in the history
  • Loading branch information
tinect committed Jan 8, 2019
1 parent d6877c2 commit 1fbd367
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
language: php

php:
- 7.2

sudo: false

env:
global:
- PLUGIN_NAME=TinectOptimusOptimizer

cache:
directories:
- "${HOME}/.composer/cache/files"

install:
- composer install

script:
- "./build.sh $TRAVIS_TAG"

deploy:
skip_cleanup: true
provider: releases
api_key:
secure: lEpEgHR4xq9a7fKer7uJIHtqc+va56eeZWCg+CeQjzqO7rM2cIFCMpPgjbvfvuen1ehS64DwAVhLhqVTrFTP/NJhj7VbjXNnsS6mDMkl6F7ojwGAXAPVD6ij1ZTPXLFkimEiAa+OeE6MnOAZ60Rj6uuc3GqvFeRF6CCLO/4zOqLC40EA1LgjwBXI4o1drFCdmuHoR176z5h0fnNjnNbeJxHVQVaLwyyFnM7rP+Piig3nAVLsDTqTiB2d4MguM1zBVdpcg+kKV7+Rn2ML5F3kdKmibqlbZ47fOs1Ru/a3WEudJd7z6x4XlnbcByLxJnyPcMQJgUlSZbBI6AOpZuSVB8XWVPqRU1gz8AHQY1GgSXd0l4KhacG8m992HZuo/wcAJduoKSRJ/vg/xQ9hGuHZhXDUK40qQNo6Bny8jrgRDL5DIkpjTAJN+8/YGdN7rj5QiWFUSTurLkcwIm4sA9KT/jRqG7avLWxAaZNPWRKgU8xhEfK3Pd1AtF1PfQQLYUrpXIoi0Aug4b86mO/qY/3tpxCIOU6UWzpC2/f7f7l00csq4zZw0hbE7IqHzxuRIaKXDb9wJl2VUL6dYhXzd6dtNJoCOll9slP/4Tpyg4+FgmAVyEDcIhdGZq7KR2lwQb2TNqScvPjF7I5aueFpTrYHvDO3Op/Lu4SnNiVm5orQsPI=
file_glob: true
file: TinectOptimusOptimizer*.zip
on:
repo: tinect/TinectOptimusOptimizer
tags: true
19 changes: 19 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash

commit=$1
if [ -z ${commit} ]; then
commit=$(git tag --sort=-creatordate | head -1)
if [ -z ${commit} ]; then
commit="master";
fi
fi

# Remove old release
rm -rf TinectOptimusOptimizer TinectOptimusOptimizer-*.zip

# Build new release
mkdir -p TinectOptimusOptimizer
git archive ${commit} | tar -x -C TinectOptimusOptimizer
composer install --no-dev -n -o -d TinectOptimusOptimizer
( find ./TinectOptimusOptimizer -type d -name ".git" && find ./TinectOptimusOptimizer -name ".gitignore" && find ./TinectOptimusOptimizer -name ".gitmodules" ) | xargs rm -r
zip -r TinectOptimusOptimizer-${commit}.zip TinectOptimusOptimizer

0 comments on commit 1fbd367

Please sign in to comment.