diff --git a/.travis.yml b/.travis.yml index c6b9e38..7c2b0ed 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,10 +30,7 @@ before_install: - docker pull "${DOCKER_IMAGE}" - chmod +x build.sh script: - - f(){ printf ' '; sleep 60; f; }; f & - - docker run --interactive=true --mount="type=bind,source=${PWD},destination=${DOCKER_PWD}" --rm=true --tty=true --workdir="${DOCKER_PWD}" -e DEBIAN_RELEASE -e MATTERMOST_RELEASE -e GOOS -e GOARCH "${DOCKER_IMAGE}" ./build.sh > .build.log 2>&1 -after_failure: - - tail -n-9000 .build.log + - docker run --interactive=true --mount="type=bind,source=${PWD},destination=${DOCKER_PWD}" --rm=true --tty=true --workdir="${DOCKER_PWD}" -e DEBIAN_RELEASE -e MATTERMOST_RELEASE -e GOOS -e GOARCH "${DOCKER_IMAGE}" ./build.sh before_deploy: - git config --local user.name 'Travis CI' - git config --local user.email 'travis@travis-ci.org' diff --git a/build.sh b/build.sh index 28313fb..f43ac1e 100644 --- a/build.sh +++ b/build.sh @@ -66,8 +66,6 @@ if [ "$(id -u)" -eq 0 ]; then # as root user fi # as non-root user cd "${HOME}" -# install yarn -npm install yarn # download and extract Mattermost sources for COMPONENT in server webapp; do install --directory "${HOME}/go/src/github.com/mattermost/mattermost-${COMPONENT}" @@ -77,6 +75,9 @@ for COMPONENT in server webapp; do --strip-components=1 --extract --file="mattermost-${COMPONENT}.tar.gz" done # build Mattermost webapp +npm set progress false +sed -i -e 's#--verbose#--display minimal#' \ + "${HOME}/go/src/github.com/mattermost/mattermost-webapp/package.json" make --directory="${HOME}/go/src/github.com/mattermost/mattermost-webapp" \ build # build Mattermost server @@ -90,6 +91,11 @@ patch --directory="${HOME}/go/src/github.com/mattermost/mattermost-server" \ --strip=1 < "${HOME}/build-release.patch" patch --directory="${HOME}/go/src/github.com/mattermost/mattermost-server" \ --strip=1 < "${HOME}/go-backport.patch" +sed -i \ + -e 's#go generate#env --unset=GOOS --unset=GOARCH &#' \ + -e 's#PWD#CURDIR#' \ + "${HOME}/go/src/github.com/mattermost/mattermost-server/Makefile" \ + "${HOME}/go/src/github.com/mattermost/mattermost-server/build/release.mk" make --directory="${HOME}/go/src/github.com/mattermost/mattermost-server" \ config-reset build-linux package-linux \ BUILD_NUMBER="dev-$(go env GOOS)-$(go env GOARCH)-${MATTERMOST_RELEASE}" \ diff --git a/dependabot/Gopkg.lock b/dependabot/Gopkg.lock index cca273b..fd61b24 100644 --- a/dependabot/Gopkg.lock +++ b/dependabot/Gopkg.lock @@ -50,7 +50,7 @@ version = "v1.10.0" [[projects]] - digest = "1:6d2f2bf1d7e18f2f7b9d2b956d7a804a8370a9eda2074af190401a25e6a181f7" + digest = "1:96ceb8ed901ce82c22fc06195041a487920c6c201760964a6c17a9b63c3fa1cf" name = "github.com/mattermost/mattermost-server" packages = [ "mlog", @@ -60,8 +60,8 @@ "utils/markdown", ] pruneopts = "" - revision = "9a8b0906fdbf2c2a309db2400f4bcc5902800e2c" - version = "v5.13.2" + revision = "3f905844dfda14efa5f4a597b97195d411b814ef" + version = "v5.14.0" [[projects]] digest = "1:9fa4a4a684dfb36f3ba1b0a163225140e19e3219e5576d0761d02dbd4c31b743" diff --git a/dependabot/Gopkg.toml b/dependabot/Gopkg.toml index 60a5a11..2c8f1af 100644 --- a/dependabot/Gopkg.toml +++ b/dependabot/Gopkg.toml @@ -1,3 +1,3 @@ [[constraint]] name = "github.com/mattermost/mattermost-server" - version = "v5.13.2" + version = "v5.14.0" diff --git a/go-backport.patch b/go-backport.patch index 5b9ab51..676a126 100644 --- a/go-backport.patch +++ b/go-backport.patch @@ -11,17 +11,17 @@ diff --git a/store/sqlstore/channel_store.go b/store/sqlstore/channel_store.go index cf63c706d..dae7c8c9c 100644 --- a/store/sqlstore/channel_store.go +++ b/store/sqlstore/channel_store.go -@@ -2156,9 +2156,9 @@ func (s SqlChannelStore) SearchAllChannels(term string, opts store.ChannelSearch +@@ -2072,9 +2072,9 @@ func (s SqlChannelStore) SearchAllChannels(term string, opts store.ChannelSearch - likeClause, likeTerm := s.buildLIKEClause(term, "c.Name, c.DisplayName, c.Purpose") - if len(likeTerm) > 0 { -- likeClause = strings.ReplaceAll(likeClause, ":LikeTerm", "'"+likeTerm+"'") -+ likeClause = strings.Replace(likeClause, ":LikeTerm", "'"+likeTerm+"'", -1) - fulltextClause, fulltextTerm := s.buildFulltextClause(term, "c.Name, c.DisplayName, c.Purpose") -- fulltextClause = strings.ReplaceAll(fulltextClause, ":FulltextTerm", "'"+fulltextTerm+"'") -+ fulltextClause = strings.Replace(fulltextClause, ":FulltextTerm", "'"+fulltextTerm+"'", -1) - query = query.Where("(" + likeClause + " OR " + fulltextClause + ")") - } + likeClause, likeTerm := s.buildLIKEClause(term, "c.Name, c.DisplayName, c.Purpose") + if len(likeTerm) > 0 { +- likeClause = strings.ReplaceAll(likeClause, ":LikeTerm", "'"+likeTerm+"'") ++ likeClause = strings.Replace(likeClause, ":LikeTerm", "'"+likeTerm+"'", -1) + fulltextClause, fulltextTerm := s.buildFulltextClause(term, "c.Name, c.DisplayName, c.Purpose") +- fulltextClause = strings.ReplaceAll(fulltextClause, ":FulltextTerm", "'"+fulltextTerm+"'") ++ fulltextClause = strings.Replace(fulltextClause, ":FulltextTerm", "'"+fulltextTerm+"'", -1) + query = query.Where("(" + likeClause + " OR " + fulltextClause + ")") + } -- 2.11.0