Updated travis to use checkout matching branch of Revel Framework for build.

This commit is contained in:
NotZippy
2018-10-12 20:50:42 -07:00
parent 8c21a56302
commit 5e36cb1025
2 changed files with 5 additions and 3 deletions

View File

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

View File

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