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

Travis CI integration #1

Merged
merged 6 commits into from
Feb 19, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
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
30 changes: 30 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# stats available at
# https://travis-ci.org/strukturag/spreed-speakfreely/
language: go

go:
- 1.1
- 1.2
- tip

env:
- GEM_HOME=/var/lib/gems/1.8

before_install:
- sudo apt-get update

install:
- sudo apt-get -y install nodejs npm rubygems python-babel
- sudo gem install sass
- sudo gem install compass
# 'npm config set ca ""' required only for node 0.6
# which is installed on Travis CI
# see https://github.com/npm/npm/issues/4379#issuecomment-31590254
- sudo npm config set ca ""
- sudo npm install -g po2json

script:
- make get
- make styles
- make javascript
- make binary
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,15 @@ DIST := $(CURDIR)/dist_$(BUILD_ARCH)
DIST_SRC := $(DIST)/src
DIST_BIN := $(DIST)/bin

NODEJS_BIN := $(shell which nodejs)
ifeq ("$(NODEJS_BIN)", "")
NODEJS_BIN := $(shell which node)
endif
NODEJS_BIN_EXISTS := $(shell [ -x "$(NODEJS_BIN)" ] && echo 1 || echo 0)
ifneq ($(NODEJS_BIN_EXISTS), 1)
$(error "Can't find node.js runtime, please install / check your PATH")
endif

build: get binary styles javascript

gopath:
Expand Down Expand Up @@ -65,7 +74,7 @@ styles:

javascript:
mkdir -p $(OUTPUT_JS)
nodejs $(CURDIR)/build/r.js -o $(CURDIR)/build/build.js dir=$(OUTPUT_JS) baseUrl=$(CURDIR)/static/js mainConfigFile=$(CURDIR)/static/js/main.js
$(NODEJS_BIN) $(CURDIR)/build/r.js -o $(CURDIR)/build/build.js dir=$(OUTPUT_JS) baseUrl=$(CURDIR)/static/js mainConfigFile=$(CURDIR)/static/js/main.js

release: GOPATH = "$(DIST):$(CURDIR)"
release: LDFLAGS = -X main.version $(VERSION) -X main.defaultConfig $(CONFIG_PATH)/$(CONFIG_FILE)
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The latest version of Spreed Speak Freely can be found on GitHub:

- [Go](http://golang.org) >= 1.1.0
- [NodeJS](http://nodejs.org/)
- [Sass](http://sass-lang.com/)
- [Sass](http://sass-lang.com/) >= 3.2.0
- [Compass](http://compass-style.org/)
- [Babel](http://babel.pocoo.org/)
- [po2json](https://github.com/mikeedwards/po2json)
Expand All @@ -19,6 +19,8 @@ The latest version of Spreed Speak Freely can be found on GitHub:

## Building

[![Build Status](https://travis-ci.org/strukturag/spreed-speakfreely.png?branch=master)](https://travis-ci.org/strukturag/spreed-speakfreely)

Go, Sass and NodeJS need to be in your $PATH.

```bash
Expand Down Expand Up @@ -97,4 +99,4 @@ The latest version of Spreed Speak Freely can be found on GitHub:

## License

`Spreed Speak Freely` uses the AGPL license, see our `LICENSE` file.
`Spreed Speak Freely` uses the AGPL license, see our `LICENSE` file.