Skip to content

Commit 8948209

Browse files
committed
Use meta repo
1 parent 93ddb89 commit 8948209

File tree

7 files changed

+30
-291
lines changed

7 files changed

+30
-291
lines changed

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "meta"]
2+
path = meta
3+
url = https://github.com/OpenSlides/openslides-meta.git

Dockerfile

+4-7
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ COPY pkg pkg
1212
# Build service in seperate stage.
1313
FROM base as builder
1414
RUN go build -o openslides-search-service cmd/searchd/main.go
15-
RUN go build -o openslides-search-generate-filter cmd/generate-filter/main.go
16-
RUN wget https://github.com/OpenSlides/openslides-backend/raw/main/global/meta/models.yml
17-
RUN ./openslides-search-generate-filter --output search.yml
1815

1916

2017
# Test build.
@@ -32,8 +29,8 @@ RUN ["go", "install", "github.com/githubnemo/CompileDaemon@latest"]
3229
EXPOSE 9050
3330

3431
COPY entrypoint.sh ./
35-
COPY search.yml .
36-
COPY --from=builder /root/models.yml .
32+
COPY meta/search.yml .
33+
COPY meta/models.yml .
3734
ENTRYPOINT ["./entrypoint.sh"]
3835
CMD CompileDaemon -log-prefix=false -build="go build -o openslides-search-service cmd/searchd/main.go" -command="./openslides-search-service"
3936

@@ -47,8 +44,8 @@ LABEL org.opencontainers.image.licenses="MIT"
4744
LABEL org.opencontainers.image.source="https://github.com/OpenSlides/openslides-search-service"
4845

4946
COPY entrypoint.sh ./
50-
COPY search.yml .
51-
COPY --from=builder /root/models.yml .
47+
COPY meta/search.yml .
48+
COPY meta/models.yml .
5249
COPY --from=builder /root/openslides-search-service .
5350
EXPOSE 9050
5451
ENTRYPOINT ["./entrypoint.sh"]

cmd/generate-filter/main.go

+1-8
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,6 @@ import (
1616
"github.com/OpenSlides/openslides-search-service/pkg/meta"
1717
)
1818

19-
const (
20-
backend = "https://raw.githubusercontent.com/OpenSlides/openslides-backend"
21-
branch = "master"
22-
modelsYML = "global/meta/models.yml"
23-
path = backend + "/" + branch + "/" + modelsYML
24-
)
25-
2619
func nolog(format string, args ...any) {}
2720

2821
func run(input, filter, output string, verbose bool) error {
@@ -84,7 +77,7 @@ func run(input, filter, output string, verbose bool) error {
8477

8578
func main() {
8679
var (
87-
input = flag.String("input", path, "source of input")
80+
input = flag.String("input", "meta/models.yml", "source of input")
8881
filter = flag.String("filter", "", "source of filter")
8982
output = flag.String("output", "", "output file (default STDOUT)")
9083
verbose = flag.Bool("verbose", false, "verbose logging")

go.mod

+6-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ require (
88
github.com/buger/jsonparser v1.1.1
99
github.com/jackc/pgx/v5 v5.4.3
1010
github.com/sirupsen/logrus v1.9.3
11-
golang.org/x/sys v0.12.0
11+
golang.org/x/sys v0.16.0
1212
gopkg.in/yaml.v3 v3.0.1
1313
)
1414

@@ -30,6 +30,8 @@ require (
3030
github.com/blevesearch/zapx/v13 v13.3.7 // indirect
3131
github.com/blevesearch/zapx/v14 v14.3.7 // indirect
3232
github.com/blevesearch/zapx/v15 v15.3.10 // indirect
33+
github.com/fatih/color v1.16.0 // indirect
34+
github.com/goccy/go-yaml v1.11.3 // indirect
3335
github.com/golang-jwt/jwt/v4 v4.5.0 // indirect
3436
github.com/golang/geo v0.0.0-20210211234256-740aa86cb551 // indirect
3537
github.com/golang/protobuf v1.5.3 // indirect
@@ -39,12 +41,15 @@ require (
3941
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect
4042
github.com/json-iterator/go v1.1.12 // indirect
4143
github.com/kr/text v0.2.0 // indirect
44+
github.com/mattn/go-colorable v0.1.13 // indirect
45+
github.com/mattn/go-isatty v0.0.20 // indirect
4246
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
4347
github.com/modern-go/reflect2 v1.0.2 // indirect
4448
github.com/mschoch/smat v0.2.0 // indirect
4549
github.com/ostcar/topic v0.4.1 // indirect
4650
go.etcd.io/bbolt v1.3.7 // indirect
4751
golang.org/x/crypto v0.13.0 // indirect
4852
golang.org/x/text v0.13.0 // indirect
53+
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect
4954
google.golang.org/protobuf v1.29.0 // indirect
5055
)

go.sum

+15
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKoh
6161
github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec=
6262
github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4=
6363
github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
64+
github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM=
65+
github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE=
66+
github.com/goccy/go-yaml v1.11.3 h1:B3W9IdWbvrUu2OYQGwvU1nZtvMQJPBKgBUuweJjLj6I=
67+
github.com/goccy/go-yaml v1.11.3/go.mod h1:wKnAMd44+9JAAnGQpWVEgBzGt3YuTaQ4uXoHvE4m7WU=
6468
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
6569
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
6670
github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg=
@@ -93,6 +97,11 @@ github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0=
9397
github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk=
9498
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
9599
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
100+
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
101+
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
102+
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
103+
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
104+
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
96105
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
97106
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
98107
github.com/moby/term v0.0.0-20221205130635-1aeaba878587 h1:HfkjXDfhgVaN5rmueG8cL8KKeFNecRCXFhaJ2qZ5SKA=
@@ -141,14 +150,20 @@ golang.org/x/mod v0.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs=
141150
golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
142151
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
143152
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
153+
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
154+
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
144155
golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o=
145156
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
157+
golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU=
158+
golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
146159
golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=
147160
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
148161
golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4=
149162
golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s=
150163
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
151164
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
165+
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU=
166+
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90=
152167
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
153168
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
154169
google.golang.org/protobuf v1.29.0 h1:44S3JjaKmLEE4YIkjzexaP+NzZsudE3Zin5Njn/pYX0=

meta

Submodule meta added at 61273b1

0 commit comments

Comments
 (0)