Skip to content

Commit

Permalink
Automatically build and release wp_lauch_check.phar on every release.
Browse files Browse the repository at this point in the history
  • Loading branch information
greg-1-anderson committed Oct 30, 2017
1 parent ebda1af commit 765c7cf
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 67 deletions.
20 changes: 16 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
sudo: false

language: php

notifications:
Expand All @@ -11,22 +10,35 @@ branches:
only:
- master
- 0.6.x
- "/^v[[:digit:]]+\\.[[:digit:]]+\\.[[:digit:]]+.*$/"

php:
- 7.0
- 5.6

cache:
- composer
- $HOME/.composer/cache
- "$HOME/.composer/cache"

env:
global:
- WP_CLI_BIN_DIR=/tmp/wp-cli-phar
- WP_CLI_BIN_DIR=/tmp/wp-cli-phar

before_script:
- bash bin/install-package-tests.sh
- composer install

script: "./vendor/bin/behat"

before_deploy:
- bash bin/prepare.sh

script: ./vendor/bin/behat
deploy:
provider: releases
api_key:
secure: bP2iK6kCYDVMrbwLEl43mZe2L5ZiYi464kowLrqmI+0vOEblHx4+m5as6AraK5jDFttL68gNwIkOyzQxFbKZDkyntu/aMNa2nXLmhg8T8aGzsHJahpuJMdU/q4e1hysMYXsn03hz31zQiU54DNbRXn9D6oD71u9Rf23FRWFET1w=
file: wp_launch_check.phar
skip_cleanup: true
on:
repo: pantheon-systems/wp_launch_check
tags: true
22 changes: 0 additions & 22 deletions bin/build-rpm.sh

This file was deleted.

17 changes: 0 additions & 17 deletions bin/build-uber-phar.sh

This file was deleted.

22 changes: 0 additions & 22 deletions bin/build-uber-rpm.sh

This file was deleted.

8 changes: 6 additions & 2 deletions utils/make-phar.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@

use Symfony\Component\Finder\Finder;

define( 'DEST_PATH', $argv[1] );
// Alias -- how to refer to paths inside the phar
$alias = 'wp_launch_check.phar';

// DEST_PATH -- where to write the actual phar on the filesystem
define( 'DEST_PATH', $alias );

function add_file( $phar, $path ) {
$key = str_replace( WP_LAUNCH_CHECK_ROOT, '', $path );
Expand All @@ -20,7 +24,7 @@ function set_file_contents( $phar, $path, $content ) {
$phar[ $key ] = $content;
}

$phar = new Phar( 'wp_launch_check.phar', 0, 'wp_launch_check.phar' );
$phar = new Phar( DEST_PATH, 0, $alias );

$phar->startBuffering();

Expand Down

0 comments on commit 765c7cf

Please sign in to comment.