Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cf0b394b05 | ||
|
|
a36b11f07d | ||
|
|
93c9ce0cad | ||
|
|
af88db42b2 | ||
|
|
0c6ccdc0a1 | ||
|
|
6d3f8171e5 | ||
|
|
3f1c570e84 | ||
|
|
cd88ae264e | ||
|
|
b2abcae319 | ||
|
|
41a5c675bf | ||
|
|
ac9f896a22 | ||
|
|
36d57914b2 | ||
|
|
800ba5dd0d | ||
|
|
a793f7b3b4 | ||
|
|
0d6dfb8319 |
@@ -4,13 +4,15 @@ stages:
|
||||
- go-test
|
||||
- build-src
|
||||
- build-docker
|
||||
- docker-registry
|
||||
- docker-registry-master
|
||||
- docker-registry-tags
|
||||
|
||||
check-dco:
|
||||
stage: check-dco
|
||||
image: debian:buster
|
||||
except:
|
||||
- master
|
||||
- tags
|
||||
script:
|
||||
- apt update
|
||||
- apt install -y curl git jq
|
||||
@@ -23,14 +25,21 @@ build-src:
|
||||
GOPATH: $CI_PROJECT_DIR
|
||||
except:
|
||||
- master
|
||||
script:
|
||||
- tags
|
||||
before_script:
|
||||
- apt update
|
||||
- apt install -y curl gnupg git make golang
|
||||
- mkdir -p /go/src /go/bin /go/pkg
|
||||
- export GOPATH=/go
|
||||
- export PATH=$PATH:/go/bin
|
||||
- curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
|
||||
- ln -s $CI_PROJECT_DIR /go/src/$CI_PROJECT_NAME
|
||||
- curl -sL https://deb.nodesource.com/setup_10.x | bash -
|
||||
- apt update
|
||||
- apt install -y nodejs
|
||||
- npm install -g html-minifier@3.5.7 uglify-js@3.4.1 sass@1.5.1
|
||||
- mkdir -p src/gitlab.com/commento && cd src/gitlab.com/commento && ln -s $CI_PROJECT_DIR && cd $CI_PROJECT_NAME
|
||||
script:
|
||||
- cd /go/src/$CI_PROJECT_NAME
|
||||
- make devel
|
||||
- make prod
|
||||
|
||||
@@ -41,6 +50,7 @@ build-docker:
|
||||
- docker:dind
|
||||
except:
|
||||
- master
|
||||
- tags
|
||||
script:
|
||||
- docker build -t commento-ce .
|
||||
|
||||
@@ -54,11 +64,17 @@ go-test:
|
||||
POSTGRES_PASSWORD: postgres
|
||||
POSTGRES_DB: commento_test
|
||||
COMMENTO_POSTGRES: postgres://postgres:postgres@postgres/commento_test?sslmode=disable
|
||||
GOPATH: $CI_PROJECT_DIR
|
||||
except:
|
||||
- master
|
||||
- tags
|
||||
before_script:
|
||||
- mkdir -p /go/src /go/bin /go/pkg
|
||||
- export GOPATH=/go
|
||||
- export PATH=$PATH:/go/bin
|
||||
- curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
|
||||
- ln -s $CI_PROJECT_DIR /go/src/$CI_PROJECT_NAME
|
||||
script:
|
||||
- mkdir -p src/gitlab.com/commento && cd src/gitlab.com/commento && ln -s $CI_PROJECT_DIR && cd $CI_PROJECT_NAME
|
||||
- cd /go/src/$CI_PROJECT_NAME
|
||||
- make test
|
||||
|
||||
go-fmt:
|
||||
@@ -66,12 +82,13 @@ go-fmt:
|
||||
image: golang:1.10.2
|
||||
except:
|
||||
- master
|
||||
- tags
|
||||
script:
|
||||
- cd api
|
||||
- test -z $(go fmt)
|
||||
|
||||
docker-registry:
|
||||
stage: docker-registry
|
||||
docker-registry-master:
|
||||
stage: docker-registry-master
|
||||
image: docker:stable
|
||||
services:
|
||||
- docker:dind
|
||||
@@ -83,3 +100,17 @@ docker-registry:
|
||||
- docker pull registry.gitlab.com/commento/commento-ce:latest || true
|
||||
- docker build --cache-from registry.gitlab.com/commento/commento-ce:latest --tag registry.gitlab.com/commento/commento-ce:latest .
|
||||
- docker push registry.gitlab.com/commento/commento-ce:latest
|
||||
|
||||
docker-registry-tags:
|
||||
stage: docker-registry-tags
|
||||
image: docker:stable
|
||||
services:
|
||||
- docker:dind
|
||||
only:
|
||||
- tags
|
||||
before_script:
|
||||
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.gitlab.com
|
||||
script:
|
||||
- apk add git
|
||||
- docker build --tag registry.gitlab.com/commento/commento-ce:$(git describe --tags) .
|
||||
- docker push registry.gitlab.com/commento/commento-ce:$(git describe --tags)
|
||||
|
||||
@@ -4,7 +4,8 @@ FROM golang:1.10.2-alpine AS api-build
|
||||
COPY ./api /go/src/commento-ce/api
|
||||
WORKDIR /go/src/commento-ce/api
|
||||
|
||||
RUN apk update && apk add bash make git
|
||||
RUN apk update && apk add bash make git curl
|
||||
RUN curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
|
||||
|
||||
RUN make prod -j$(($(nproc) + 1))
|
||||
|
||||
|
||||
10
README.md
10
README.md
@@ -38,6 +38,16 @@ Commento is possible only because of its community. If this is your first contri
|
||||
|
||||
Help will always be given to those who ask for it. We use IRC for chat to collaborate with other developers. You're invited to [hang out with us](https://irc.commento.io) in the `#commento-dev` channel on freenode if you want to contribute to Commento!
|
||||
|
||||
### Sponsors
|
||||
|
||||
Commento CE development is sponsored by [Mozilla](https://mozilla.org) and [DigitalOcean](https://www.digitalocean.com/) independently.
|
||||
|
||||
<p align="center">
|
||||
<a href="https://www.mozilla.org/en-US/"><img src="https://user-images.githubusercontent.com/7521600/32265838-d05b2d08-bf0a-11e7-92e1-2cb183eae616.png" title="Mozilla" height="40"></a>
|
||||
|
||||
<a href="https://www.digitalocean.com"><img src="https://user-images.githubusercontent.com/7521600/32265839-d093c7da-bf0a-11e7-8d99-96a940041d06.png" title="DigitalOcean" height="40"></a>
|
||||
</p>
|
||||
|
||||
#### License
|
||||
|
||||
```
|
||||
|
||||
0
Gopkg.lock → api/Gopkg.lock
generated
0
Gopkg.lock → api/Gopkg.lock
generated
@@ -25,15 +25,15 @@ clean:
|
||||
# later down the line).
|
||||
|
||||
devel-go:
|
||||
go get -v .
|
||||
dep ensure
|
||||
go build -i -v -o $(GO_DEVEL_BUILD_BINARY)
|
||||
|
||||
prod-go:
|
||||
go get -v .
|
||||
dep ensure
|
||||
go build -i -v -o $(GO_PROD_BUILD_BINARY)
|
||||
|
||||
test-go:
|
||||
go get -v .
|
||||
dep ensure
|
||||
go test -v .
|
||||
|
||||
$(shell mkdir -p $(GO_DEVEL_BUILD_DIR) $(GO_PROD_BUILD_DIR))
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package main
|
||||
|
||||
var edition = "ce"
|
||||
var version = "v1.1.0"
|
||||
var version = "v1.3.1"
|
||||
|
||||
@@ -60,6 +60,16 @@ func domainDelete(domain string) error {
|
||||
return errorInternal
|
||||
}
|
||||
|
||||
statement = `
|
||||
DELETE FROM pages
|
||||
WHERE pages.domain = $1;
|
||||
`
|
||||
_, err = db.Exec(statement, domain)
|
||||
if err != nil {
|
||||
logger.Errorf(statement, domain)
|
||||
return errorInternal
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -31,8 +31,8 @@ func ownerGetByOwnerToken(ownerToken string) (owner, error) {
|
||||
statement := `
|
||||
SELECT ownerHex, email, name, confirmedEmail, joinDate
|
||||
FROM owners
|
||||
WHERE email IN (
|
||||
SELECT email FROM ownerSessions
|
||||
WHERE ownerHex IN (
|
||||
SELECT ownerHex FROM ownerSessions
|
||||
WHERE ownerToken = $1
|
||||
);
|
||||
`
|
||||
|
||||
7
db/20181007230906-store-version.sql
Normal file
7
db/20181007230906-store-version.sql
Normal file
@@ -0,0 +1,7 @@
|
||||
CREATE TABLE IF NOT EXISTS config (
|
||||
version TEXT NOT NULL
|
||||
);
|
||||
|
||||
INSERT INTO
|
||||
config (version)
|
||||
VALUES ('v1.1.3');
|
||||
2
db/20181007231407-v1.1.4.sql
Normal file
2
db/20181007231407-v1.1.4.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
UPDATE config
|
||||
SET version = 'v1.2.0';
|
||||
@@ -588,7 +588,7 @@
|
||||
}
|
||||
|
||||
cur.sort(function(a, b) {
|
||||
return a.score - b.score;
|
||||
return b.score - a.score;
|
||||
});
|
||||
|
||||
var cards = create("div");
|
||||
|
||||
@@ -152,7 +152,7 @@ textarea {
|
||||
}
|
||||
|
||||
.commento-create-button {
|
||||
width: 120px;
|
||||
width: 150px;
|
||||
background: $pink-9;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user