Skip to content

Commit

Permalink
Merge pull request #145 from JrGoodle/scripts
Browse files Browse the repository at this point in the history
Scripts to rule them all
  • Loading branch information
JrGoodle committed Feb 2, 2016
2 parents 552fad5 + 3e89fc0 commit 1c34584
Show file tree
Hide file tree
Showing 17 changed files with 47 additions and 95 deletions.
19 changes: 7 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,18 @@ dist: trusty

env:
matrix:
- TARGET="test_cats_example"
- TARGET="test_llvm_example"
- TARGET="cats"
- TARGET="llvm"

before_install:
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get update; fi
before_install: script/bootstrap

install:
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew install python3; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew install github-release; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get install -y python3-setuptools; fi
install: if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew install github-release; fi

before_script: sudo python3 setup.py install
before_script: script/setup

script: scripts/${TARGET}.sh
script: script/test ${TARGET}

after_success: if [ "$TRAVIS_OS_NAME" = "osx" ]; then scripts/deploy.sh; fi
after_success: if [ "$TRAVIS_OS_NAME" = "osx" ]; then script/deploy; fi

branches:
only: # whitelist
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ $ brew install python3
To install from the [GitHub Releases](https://github.com/JrGoodle/clowder/releases) open a terminal and run:

```bash
$ pip3 install https://github.com/JrGoodle/clowder/releases/download/1.1.0/clowder-1.1.0-py3-none-any.whl
$ pip3 install https://github.com/JrGoodle/clowder/releases/download/1.1.1/clowder-1.1.1-py3-none-any.whl
```

For terminal autocompletion, add the following to your shell profile:
Expand Down
2 changes: 1 addition & 1 deletion clowder/cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def __init__(self):
self.args = parser.parse_args()

if self.args.clowder_version:
print('clowder version 1.1.0')
print('clowder version 1.1.1')
sys.exit(0)
print('')
if self.args.command is None or not hasattr(self, self.args.command):
Expand Down
2 changes: 1 addition & 1 deletion scripts/README.md → script/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Test Scripts
# Scripts

## `test_cats_example.sh`

Expand Down
17 changes: 17 additions & 0 deletions script/bootstrap
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env bash

case "$(uname)" in
Linux) export MY_PLATFORM="linux";
sudo apt-get update
sudo apt-get install -y python3-setuptools
;;
Darwin) export MY_PLATFORM="osx";
which brew || exit 1
brew update
brew install python3
;;
CYGWIN*) export MY_PLATFORM="windows";
;;
esac

echo $MY_PLATFORM
1 change: 1 addition & 0 deletions uninstall.sh → script/clean
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bash

cd "$( dirname "${BASH_SOURCE[0]}" )" || exit 1

sudo -H rm -rf clowder.egg-info
sudo -H rm -rf dist
sudo -H rm -rf build
Expand Down
2 changes: 1 addition & 1 deletion scripts/deploy.sh → script/deploy
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

cd "$( dirname "${BASH_SOURCE[0]}" )" || exit 1

echo "deploy.sh"
echo "deploy"

if [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then
echo "This is a pull request. No deployment will be done."
Expand Down
4 changes: 4 additions & 0 deletions script/setup
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env bash

cd "$( dirname "${BASH_SOURCE[0]}" )/.." || exit 1
sudo python3 setup.py install
9 changes: 9 additions & 0 deletions script/test
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash

cd "$( dirname "${BASH_SOURCE[0]}" )" || exit 1

if [ $1 == "cats" ]; then
./test_cats_example.sh
elif [ $1 == "llvm" ]; then
./test_llvm_example.sh
fi
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 3 additions & 1 deletion install.sh → script/update
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/usr/bin/env bash

cd "$( dirname "${BASH_SOURCE[0]}" )" || exit 1
sudo python3 setup.py install

./clean
./setup
2 changes: 1 addition & 1 deletion update_version.sh → script/update_version
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

cd "$( dirname "${BASH_SOURCE[0]}" )" || exit 1
cd "$( dirname "${BASH_SOURCE[0]}" )/.." || exit 1

OLD_VERSION=$1
NEW_VERSION=$2
Expand Down
76 changes: 0 additions & 76 deletions scripts/test_srclib_example.sh

This file was deleted.

2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
setup(
name='clowder',
description='A tool for managing code',
version='1.1.0',
version='1.1.1',
url='http://clowder.cat',
author='joe DeCapo',
author_email='joe@polka.cat',
Expand Down

0 comments on commit 1c34584

Please sign in to comment.