Skip to content

Commit

Permalink
initial check-in
Browse files Browse the repository at this point in the history
  • Loading branch information
dietb committed Dec 30, 2020
0 parents commit 5a51435
Show file tree
Hide file tree
Showing 186 changed files with 61,510 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
98 changes: 98 additions & 0 deletions CREDITS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
# Credits

Thanks to all of the previous owners of this codebase!

@andrew-anki
@kevinatanki
@bradneuman
@DanielCasner
@asterick
@ilngo
@alchausee
@leecrippen
@dmudie-anki
@ryeander
@kevinmkarol
@JMRivas
@donovandrane
@MollyJameson
@msintov
@rosspanderson
@nishkar
@TrevorDasch
@CodeForCoffee
@pohung
@dstulic
@ratanki
@baustinanki
@nathan-anki
@arjungm
@paulaluri
@RichardGale
@shawnblakesley
@ankimichael
@dcerpa-anki
@ashello
@mmichini
@chapados
@Jarboo-anki
@craigalicious
@ankiNicolas
@Sam-Anki
@lorenzoriano
@charlesgallant-anki
@amyclaus
@mike-anki
@anki-smartling
@seanlevatino
@frgmike
@jaye-anki
@agoaj
@aplatti
@MoolySegal
@DariaAnki
@scopp
@robbula
@scritelli-anki
@sandyspangler
@gwatts
@fightingwords
@holomatt
@WesleyYue
@rakeshr4
@nakkapeddi
@mprokos
@andrewpbstout
@charliehuge
@swilkewitz
@BruceVonK
@BenGabaldon
@ankikreyna
@Isabela3
@Humhu
@maxcembalest
@jfhardy
@AwotG
@keikoko
@Eldres
@selenatiker
@sonnguyen-logigear
@nhuehle
@jesseeaseley
@joepvg
@vitaly-anki
@troyanki
@chris-rogers-anki
@foodini
@ankialex
@ak2539
@thanhlelgg
@rachelAnki
@nimeshmonson
@ahilvers-anki
@LeighAusiello
@G-mel
@AnkiEdison
@patjdor
@hdiggins
@abertolini-anki
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021 Digital Dream Labs

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
54 changes: 54 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
.PHONY: docker-builder vic-cloud vic-gateway

docker-builder:
docker build -t armbuilder docker-builder/.

all: vic-cloud vic-gateway

go_deps:
echo `go version` && cd $(PWD) && go mod download

vic-cloud: go_deps
docker container run \
-v "$(PWD)":/go/src/digital-dream-labs/vector-cloud \
-v $(GOPATH)/pkg/mod:/go/pkg/mod \
-w /go/src/digital-dream-labs/vector-cloud \
--user $(UID):$(GID) \
armbuilder \
go build \
-tags nolibopusfile,vicos \
--trimpath \
-ldflags '-w -s -linkmode internal -extldflags "-static" -r /anki/lib' \
-o build/vic-cloud \
cloud/main.go

docker container run \
-v "$(PWD)":/go/src/digital-dream-labs/vector-cloud \
-v $(GOPATH)/pkg/mod:/go/pkg/mod \
-w /go/src/digital-dream-labs/vector-cloud \
--user $(UID):$(GID) \
armbuilder \
upx build/vic-cloud


vic-gateway: go_deps
docker container run \
-v "$(PWD)":/go/src/digital-dream-labs/vector-cloud \
-v $(GOPATH)/pkg/mod:/go/pkg/mod \
-w /go/src/digital-dream-labs/vector-cloud \
--user $(UID):$(GID) \
armbuilder \
go build \
-tags nolibopusfile,vicos \
--trimpath \
-ldflags '-w -s -linkmode internal -extldflags "-static" -r /anki/lib' \
-o build/vic-gateway \
gateway/*.go

docker container run \
-v "$(PWD)":/go/src/digital-dream-labs/vector-cloud \
-v $(GOPATH)/pkg/mod:/go/pkg/mod \
-w /go/src/digital-dream-labs/vector-cloud \
--user $(UID):$(GID) \
armbuilder \
upx build/vic-gateway
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Vector-cloud

Programs that make Vector talk to the cloud!

## Building

To build the binaries, you'll first need the armbuilder docker image. It can be generated by running..
```
# make docker-builder
```

To build vic-cloud, run...
```
# make vic-cloud
```

To build vic-gateway, run...
```
# make vic-gateway
```

Binary file added build/vic-cloud
Binary file not shown.
Binary file added build/vic-gateway
Binary file not shown.
19 changes: 19 additions & 0 deletions cloud/cert_error_dev.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// +build !shipping,vicos

package main

import (
"github.com/digital-dream-labs/vector-cloud/internal/log"
"github.com/digital-dream-labs/vector-cloud/internal/robot"
)

func init() {
certErrorFunc = onCertError
}

func onCertError() bool {
if err := robot.WriteFaceErrorCode(850); err != nil {
log.Println("Error writing error code (isn't it ironic?):", err)
}
return true
}
5 changes: 5 additions & 0 deletions cloud/config_dev.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// +build !shipping

package main

const verbose = true
5 changes: 5 additions & 0 deletions cloud/config_shipping.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// +build shipping

package main

const verbose = false
Loading

0 comments on commit 5a51435

Please sign in to comment.