* Modify asn1 patch This mirrors how it is working locally: - `sudo` needs to be called this way to modify a readonly file the current user only has read access to - `sudo` may not be used to call `make patch-asn1` as it would change the user context and patch the the file for the root user (it was go 1.17 for the root user) - the network stack uses the crypt package in `GOROOT` instead of any downlaoded package via modules or vendor * Makefile fixes - make sure sudo runs with the current users paths and not with the root paths * Remove crypto tests and crypto mod These tests require crypto to be added as a mod, but the network stack won’t use the crypto package in mods or vendors but the system crypto package. Hence the tests will not validate if the network stack use the patched version
34 lines
665 B
Go
34 lines
665 B
Go
package main
|
|
|
|
import (
|
|
"embed"
|
|
"io"
|
|
"io/fs"
|
|
"log"
|
|
|
|
"github.com/evcc-io/evcc/cmd"
|
|
"github.com/evcc-io/evcc/server"
|
|
_ "github.com/evcc-io/evcc/util/goversion" // require minimum go version
|
|
)
|
|
|
|
//go:embed dist
|
|
var assets embed.FS
|
|
|
|
// init loads embedded assets unless live assets are already loaded
|
|
func init() {
|
|
if server.Assets == nil {
|
|
fsys, err := fs.Sub(assets, "dist")
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
server.Assets = fsys
|
|
}
|
|
}
|
|
|
|
func main() {
|
|
// suppress deprecated: golang.org/x/oauth2: Transport.CancelRequest no longer does anything; use contexts
|
|
// see https://github.com/golang/oauth2/issues/487
|
|
log.SetOutput(io.Discard)
|
|
|
|
cmd.Execute()
|
|
}
|