Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
f3eb93ca18
5 changed files with 13 additions and 5 deletions
4
Makefile
4
Makefile
|
@ -3,7 +3,7 @@ SHA := $(shell git rev-parse --short HEAD)
|
||||||
all: build
|
all: build
|
||||||
|
|
||||||
deps:
|
deps:
|
||||||
# which npm && npm -g install uglify-js less
|
# which npm && npm -g install uglify-js less autoprefixer
|
||||||
go get github.com/GeertJohan/go.rice/rice
|
go get github.com/GeertJohan/go.rice/rice
|
||||||
go get github.com/franela/goblin
|
go get github.com/franela/goblin
|
||||||
go get -t -v ./...
|
go get -t -v ./...
|
||||||
|
@ -39,7 +39,7 @@ clean:
|
||||||
rm -f packaging/root/usr/local/bin/droned
|
rm -f packaging/root/usr/local/bin/droned
|
||||||
|
|
||||||
lessc:
|
lessc:
|
||||||
lessc --clean-css server/app/styles/drone.less server/app/styles/drone.css
|
lessc --clean-css server/app/styles/drone.less | autoprefixer > server/app/styles/drone.css
|
||||||
|
|
||||||
packages: clean build embed deb rpm
|
packages: clean build embed deb rpm
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -113,7 +113,6 @@ WHERE c.repo_id = r.repo_id
|
||||||
WHERE c.repo_id = r.repo_id
|
WHERE c.repo_id = r.repo_id
|
||||||
AND r.repo_id = p.repo_id
|
AND r.repo_id = p.repo_id
|
||||||
AND p.user_id = ?
|
AND p.user_id = ?
|
||||||
AND c.commit_status NOT IN ('Started', 'Pending')
|
|
||||||
GROUP BY r.repo_id
|
GROUP BY r.repo_id
|
||||||
) ORDER BY c.commit_created DESC LIMIT 5;
|
) ORDER BY c.commit_created DESC LIMIT 5;
|
||||||
`
|
`
|
||||||
|
|
|
@ -203,9 +203,16 @@ func TestCommitstore(t *testing.T) {
|
||||||
Sha: "0a74b46d7d62b737b6906897f48dbeb72cfda222",
|
Sha: "0a74b46d7d62b737b6906897f48dbeb72cfda222",
|
||||||
Status: model.StatusSuccess,
|
Status: model.StatusSuccess,
|
||||||
}
|
}
|
||||||
|
commit4 := model.Commit{
|
||||||
|
RepoID: repo2.ID,
|
||||||
|
Branch: "bar",
|
||||||
|
Sha: "d923a61d8ad3d8d02db4fef0bf40a726bad0fc03",
|
||||||
|
Status: model.StatusStarted,
|
||||||
|
}
|
||||||
cs.PostCommit(&commit1)
|
cs.PostCommit(&commit1)
|
||||||
cs.PostCommit(&commit2)
|
cs.PostCommit(&commit2)
|
||||||
cs.PostCommit(&commit3)
|
cs.PostCommit(&commit3)
|
||||||
|
cs.PostCommit(&commit4)
|
||||||
perm1 := model.Perm{
|
perm1 := model.Perm{
|
||||||
RepoID: repo1.ID,
|
RepoID: repo1.ID,
|
||||||
UserID: 1,
|
UserID: 1,
|
||||||
|
@ -228,6 +235,8 @@ func TestCommitstore(t *testing.T) {
|
||||||
g.Assert(commits[0].RepoID).Equal(commit1.RepoID)
|
g.Assert(commits[0].RepoID).Equal(commit1.RepoID)
|
||||||
g.Assert(commits[0].Branch).Equal(commit1.Branch)
|
g.Assert(commits[0].Branch).Equal(commit1.Branch)
|
||||||
g.Assert(commits[0].Sha).Equal(commit1.Sha)
|
g.Assert(commits[0].Sha).Equal(commit1.Sha)
|
||||||
|
g.Assert(commits[1].Sha).Equal(commit4.Sha)
|
||||||
|
g.Assert(commits[1].Status).Equal(commit4.Status)
|
||||||
})
|
})
|
||||||
|
|
||||||
g.It("Should enforce unique Sha + Branch", func() {
|
g.It("Should enforce unique Sha + Branch", func() {
|
||||||
|
|
|
@ -33,7 +33,7 @@ func GetBadge(c web.C, w http.ResponseWriter, r *http.Request) {
|
||||||
host = c.URLParams["host"]
|
host = c.URLParams["host"]
|
||||||
owner = c.URLParams["owner"]
|
owner = c.URLParams["owner"]
|
||||||
name = c.URLParams["name"]
|
name = c.URLParams["name"]
|
||||||
branch = c.URLParams["branch"]
|
branch = r.FormValue("branch")
|
||||||
)
|
)
|
||||||
|
|
||||||
// an SVG response is always served, even when error, so
|
// an SVG response is always served, even when error, so
|
||||||
|
|
Loading…
Reference in a new issue