Compare commits
3 commits
Author | SHA1 | Date | |
---|---|---|---|
d983bfb9a3 | |||
097e95bdb1 | |||
fc7a556b5d |
3 changed files with 14 additions and 17 deletions
|
@ -62,11 +62,15 @@ test sqlite to postgres:
|
|||
.build-deb:
|
||||
stage: build
|
||||
image: debian:buster
|
||||
script:
|
||||
before_script:
|
||||
- echo deb http://deb.debian.org/debian buster-backports main > /etc/apt/sources.list.d/backports.list
|
||||
- apt-get update
|
||||
- apt-get install -y -t buster-backports git-buildpackage dh-golang bash-completion golang-any golang-github-spf13-cobra-dev golang-github-spf13-viper-dev golang-github-google-uuid-dev golang-github-mattn-go-sqlite3-dev golang-github-lib-pq-dev golang-github-satori-go.uuid-dev
|
||||
- apt-get install -y -t buster-backports git-buildpackage dh-golang bash-completion golang-any golang-github-spf13-cobra-dev golang-github-spf13-viper-dev golang-github-google-uuid-dev golang-github-mattn-go-sqlite3-dev golang-github-lib-pq-dev golang-github-satori-go.uuid-dev wget unzip
|
||||
- wget -O golang-github-mdp-qrterminal.zip --quiet "https://gitlab.com/api/v4/projects/signald%2Flibraries%2Fgolang-github-mdp-qrterminal/jobs/artifacts/master/download?job=build"
|
||||
- wget -O golang-github-jedib0t-go-pretty.zip --quiet "https://gitlab.com/api/v4/projects/signald%2Flibraries%2Fgolang-github-jedib0t-go-pretty/jobs/artifacts/master/download?job=build"
|
||||
- for z in *.zip; do unzip $z; done
|
||||
- apt-get install -y ./*.deb && rm -vf *.deb
|
||||
script:
|
||||
- 'sed -i "s/^Architecture:.*/Architecture: ${ARCH}/g" debian/control'
|
||||
- go run ./cmd/signaldctl doc -o man
|
||||
- go run ./cmd/signaldctl completion bash > debian/package.bash-completion
|
||||
|
@ -74,15 +78,6 @@ test sqlite to postgres:
|
|||
- gbp dch --ignore-branch --debian-tag="%(version)s" --git-author --new-version="$(./version.sh | cut -c2-)"
|
||||
- dpkg-buildpackage -us -uc -b
|
||||
- mv ../*.deb .
|
||||
needs:
|
||||
- project: signald/libraries/golang-github-mdp-qrterminal
|
||||
job: build
|
||||
ref: master
|
||||
artifacts: true
|
||||
- project: signald/libraries/golang-github-jedib0t-go-pretty
|
||||
job: build
|
||||
ref: master
|
||||
artifacts: true
|
||||
variables:
|
||||
SIGNALDCTL_PUBLIC_DOC_MODE: "on"
|
||||
artifacts:
|
||||
|
|
|
@ -33,6 +33,7 @@ var (
|
|||
{InstalledRank: 4, Version: "14", Description: "multiple identity keys per account", Script: "V14__multiple_identity_keys_per_account.sql", Checksum: -1635788950},
|
||||
{InstalledRank: 5, Version: "15", Description: "profiles tables", Script: "V15__profiles_tables.sql", Checksum: 809686180},
|
||||
{InstalledRank: 6, Version: "16", Description: "destination uuid in envelope", Script: "V16__destination_uuid_in_envelope.sql", Checksum: 357656854},
|
||||
{InstalledRank: 7, Version: "17", Description: "update server ca", Script: "V17__update_server_ca.sql", Checksum: 1647934070},
|
||||
}
|
||||
|
||||
sqlitePath string
|
||||
|
|
|
@ -104,7 +104,7 @@ func (s *Signald) Close() error {
|
|||
}
|
||||
|
||||
// Listen listens for events from signald
|
||||
func (s *Signald) Listen(c chan client_protocol.BasicResponse) {
|
||||
func (s *Signald) Listen(c chan client_protocol.BasicResponse) error {
|
||||
for {
|
||||
msg, err := s.readNext()
|
||||
if err == io.EOF {
|
||||
|
@ -112,7 +112,11 @@ func (s *Signald) Listen(c chan client_protocol.BasicResponse) {
|
|||
if c != nil {
|
||||
close(c)
|
||||
}
|
||||
return
|
||||
return nil
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if msg.Type == "unexpected_error" {
|
||||
|
@ -174,9 +178,6 @@ func (s *Signald) readNext() (b client_protocol.BasicResponse, err error) {
|
|||
} else {
|
||||
err = json.NewDecoder(s.socket).Decode(&b)
|
||||
}
|
||||
if err != nil {
|
||||
log.Println("signald-go: error decoding message from signald:", err)
|
||||
return
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue