mirror of
https://github.com/kevin-DL/revel-cmd.git
synced 2026-01-11 18:54:31 +00:00
Updated travis to use checkout matching branch of Revel Framework for build.
This commit is contained in:
@@ -26,6 +26,8 @@ install:
|
||||
- export REVEL_BRANCH="develop"
|
||||
- 'if [[ "$TRAVIS_BRANCH" == "master" ]]; then export REVEL_BRANCH="master"; fi'
|
||||
- 'echo "Travis branch: $TRAVIS_BRANCH, Revel dependency branch: $REVEL_BRANCH"'
|
||||
- git clone -b $REVEL_BRANCH git://github.com/revel/revel ../revel/
|
||||
- git clone -b $REVEL_BRANCH git://github.com/revel/modules ../modules/
|
||||
- go get -t -v github.com/revel/cmd/revel
|
||||
- go get -u github.com/golang/dep/cmd/dep
|
||||
- echo $GOPATH
|
||||
|
||||
@@ -16,7 +16,7 @@ type Version struct {
|
||||
}
|
||||
|
||||
// The compatibility list
|
||||
var frameworkCompatibleList = [][]string{
|
||||
var frameworkCompatibleRangeList = [][]string{
|
||||
{"0.0.0", "0.20.0"}, // minimum Revel version to use with this version of the tool
|
||||
{"0.19.99", "0.30.0"}, // Compatible with Framework V 0.19.99 - 0.30.0
|
||||
}
|
||||
@@ -56,7 +56,7 @@ func (v *Version) intOrZero(input string) (value int) {
|
||||
|
||||
// Returns true if this major revision is compatible
|
||||
func (v *Version) CompatibleFramework(c *CommandConfig) error {
|
||||
for i, rv := range frameworkCompatibleList {
|
||||
for i, rv := range frameworkCompatibleRangeList {
|
||||
start, _ := ParseVersion(rv[0])
|
||||
end, _ := ParseVersion(rv[1])
|
||||
if !v.Newer(start) || v.Newer(end) {
|
||||
@@ -68,7 +68,7 @@ func (v *Version) CompatibleFramework(c *CommandConfig) error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
return errors.New("Unknown versions - do a 'go get -u github.com/revel/cmd/revel github.com/revel/modules github.com/revel/revel'")
|
||||
return errors.New("Tool out of date - do a 'go get -u github.com/revel/cmd/revel'")
|
||||
}
|
||||
|
||||
// Returns true if this major revision is newer then the passed in
|
||||
|
||||
Reference in New Issue
Block a user