Browse Source

Merge pull request #1 from fancycode/travisci-integration

Travis CI integration
pull/3/head
Joachim Bauch 12 years ago
parent
commit
7189530935
  1. 30
      .travis.yml
  2. 11
      Makefile
  3. 6
      README.md

30
.travis.yml

@ -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
Makefile

@ -38,6 +38,15 @@ DIST := $(CURDIR)/dist_$(BUILD_ARCH)
DIST_SRC := $(DIST)/src DIST_SRC := $(DIST)/src
DIST_BIN := $(DIST)/bin 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 build: get binary styles javascript
gopath: gopath:
@ -65,7 +74,7 @@ styles:
javascript: javascript:
mkdir -p $(OUTPUT_JS) 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: GOPATH = "$(DIST):$(CURDIR)"
release: LDFLAGS = -X main.version $(VERSION) -X main.defaultConfig $(CONFIG_PATH)/$(CONFIG_FILE) release: LDFLAGS = -X main.version $(VERSION) -X main.defaultConfig $(CONFIG_PATH)/$(CONFIG_FILE)

6
README.md

@ -10,7 +10,7 @@ The latest version of Spreed Speak Freely can be found on GitHub:
- [Go](http://golang.org) >= 1.1.0 - [Go](http://golang.org) >= 1.1.0
- [NodeJS](http://nodejs.org/) - [NodeJS](http://nodejs.org/)
- [Sass](http://sass-lang.com/) - [Sass](http://sass-lang.com/) >= 3.2.0
- [Compass](http://compass-style.org/) - [Compass](http://compass-style.org/)
- [Babel](http://babel.pocoo.org/) - [Babel](http://babel.pocoo.org/)
- [po2json](https://github.com/mikeedwards/po2json) - [po2json](https://github.com/mikeedwards/po2json)
@ -19,6 +19,8 @@ The latest version of Spreed Speak Freely can be found on GitHub:
## Building ## 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. Go, Sass and NodeJS need to be in your $PATH.
```bash ```bash
@ -97,4 +99,4 @@ The latest version of Spreed Speak Freely can be found on GitHub:
## License ## License
`Spreed Speak Freely` uses the AGPL license, see our `LICENSE` file. `Spreed Speak Freely` uses the AGPL license, see our `LICENSE` file.

Loading…
Cancel
Save