Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Adding build script #44

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
language: php

sudo: false

cache:
directories:
- $HOME/.composer/cache/files

- $HOME/.composer/cache/files
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any reason why you removed these spaces?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no not really but the travis shell script removes it (:

matrix:
include:
- php: 5.3
Expand Down Expand Up @@ -49,3 +46,12 @@ notifications:
on_success: change
on_failure: always
on_start: never

deploy:
- provider: releases
skip_cleanup: true
api_key:
secure: XufYEOR4sihf4gJ9zTizrupydaQnkCVZLDbdXRAmfVNgDQNkSI2a8aKyGxxH2YTmJn65DHiFAuNMv5LIwG1e1XuiuW4ZFsEOj7o+qV5NZCzkTiYY4qYVlsut2lk8Y6dOaJl9wjvBKxK/ELbs66M4NS/3qSluaGAL1K3DtuBzF0MFLT0S4HhwoYkkJaTx3XZcCNSJA7kxT/yhSpMOhlmVXw89yJbxHiVya/YVLBHGSFpN8WpHSYxZuOnWw4OZrvS/Le+v9cvxqK1JLzV6tKe6X3DtBRzyVoO+c0CXm7Q0nn+HYtuZHnn2uOsLb68kRo8R2jjRImF/q6xdhoUHmrKFa8GgaVZkYHoCYVIbX0e2DzLvgo5DXEs1H8sNKFBjI0zRj8B9CDV6Blqap3a4d6JBsmmTAt4sFENWU4Gekv/vfB9PEIjmbLl+5/YHQcHtzU+kMnAGzpJ2d+M9BOjiUPdEHSek7vaEdE5ySAMM/0PZo2y9ZP1Go7yzHybip3WdLO6G8Q0HOoYUL0orJ9rZOT+NYBIgWXHymyFM2TJvoGlgsQRzagVseyH8qbmGo1FuMrTGePYjCo00xT3S2RgW4nXMPi0Qx6dsTUqGZDr8v1Qz2gKJlgP/a7Wpd+P1km+ibkVyqb94CgCx3Ryxf7YBplUuPT9Th+f/AiGOFh9OLA729M4=
file: puli.phar
on:
tags: true
36 changes: 19 additions & 17 deletions bin/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,6 @@ eval "$(ssh-agent -s)" #start the ssh agent
chmod 600 .travis/build-key.pem
ssh-add .travis/build-key.pem

# Setup git defaults:
# TODO set username and email
git config --global user.email "[email protected]"
git config --global user.name "Johannes Wachter"

# Add SSH-based remote to GitHub repo:
# TODO remote
git remote add deploy [email protected]:wachterjohannes/cli.git
git fetch deploy

# Get box and build PHAR
wget https://box-project.github.io/box2/manifest.json
BOX_URL=$(php bin/parse-manifest.php manifest.json)
Expand All @@ -25,13 +15,25 @@ wget -O box.phar ${BOX_URL}
chmod 755 box.phar
./box.phar build -vv

# TODO if build with gh-pages
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's happening with these TODOs?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i will remove it when its clear how we deploy the files (:


# Setup git defaults:
# TODO set username and email
# git config --global user.email "[email protected]"
# git config --global user.name "Johannes Wachter"

# Add SSH-based remote to GitHub repo:
# TODO remote
# git remote add deploy [email protected]:wachterjohannes/cli.git
# git fetch deploy

# Checkout gh-pages and add PHAR file and version:
git checkout -b gh-pages deploy/gh-pages
git pull deploy gh-pages
mv build/* ./puli.phar
sha1sum puli.phar > puli.phar.version
git add puli.phar puli.phar.version
# git checkout -b gh-pages deploy/gh-pages
# git pull deploy gh-pages
# mv build/* ./puli.phar
# sha1sum puli.phar > puli.phar.version
# git add puli.phar puli.phar.version

# Commit and push:
git commit -m 'Rebuilt phar'
git push deploy gh-pages:gh-pages
# git commit -m 'Rebuilt phar'
# git push deploy gh-pages:gh-pages