mirror of
https://github.com/juanfont/headscale.git
synced 2024-12-27 22:55:52 -05:00
Merge branch 'main' into fix-shared-nodes
This commit is contained in:
commit
9f52a64a6a
@ -20,6 +20,7 @@ builds:
|
|||||||
- -mod=readonly
|
- -mod=readonly
|
||||||
ldflags:
|
ldflags:
|
||||||
- -s -w -X github.com/juanfont/headscale/cmd/headscale/cli.Version=v{{.Version}}
|
- -s -w -X github.com/juanfont/headscale/cmd/headscale/cli.Version=v{{.Version}}
|
||||||
|
|
||||||
- id: linux-armhf
|
- id: linux-armhf
|
||||||
main: ./cmd/headscale/headscale.go
|
main: ./cmd/headscale/headscale.go
|
||||||
mod_timestamp: '{{ .CommitTimestamp }}'
|
mod_timestamp: '{{ .CommitTimestamp }}'
|
||||||
@ -49,9 +50,16 @@ builds:
|
|||||||
- linux
|
- linux
|
||||||
goarch:
|
goarch:
|
||||||
- amd64
|
- amd64
|
||||||
goarm:
|
main: ./cmd/headscale/headscale.go
|
||||||
- 6
|
mod_timestamp: '{{ .CommitTimestamp }}'
|
||||||
- 7
|
ldflags:
|
||||||
|
- -s -w -X github.com/juanfont/headscale/cmd/headscale/cli.Version=v{{.Version}}
|
||||||
|
|
||||||
|
- id: linux-arm64
|
||||||
|
goos:
|
||||||
|
- linux
|
||||||
|
goarch:
|
||||||
|
- arm64
|
||||||
main: ./cmd/headscale/headscale.go
|
main: ./cmd/headscale/headscale.go
|
||||||
mod_timestamp: '{{ .CommitTimestamp }}'
|
mod_timestamp: '{{ .CommitTimestamp }}'
|
||||||
ldflags:
|
ldflags:
|
||||||
@ -63,6 +71,7 @@ archives:
|
|||||||
- darwin-amd64
|
- darwin-amd64
|
||||||
- linux-armhf
|
- linux-armhf
|
||||||
- linux-amd64
|
- linux-amd64
|
||||||
|
- linux-arm64
|
||||||
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
|
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
|
||||||
format: binary
|
format: binary
|
||||||
|
|
||||||
|
@ -131,7 +131,7 @@ var createPreAuthKeyCmd = &cobra.Command{
|
|||||||
}
|
}
|
||||||
|
|
||||||
var expirePreAuthKeyCmd = &cobra.Command{
|
var expirePreAuthKeyCmd = &cobra.Command{
|
||||||
Use: "expire",
|
Use: "expire KEY",
|
||||||
Short: "Expire a preauthkey",
|
Short: "Expire a preauthkey",
|
||||||
Args: func(cmd *cobra.Command, args []string) error {
|
Args: func(cmd *cobra.Command, args []string) error {
|
||||||
if len(args) < 1 {
|
if len(args) < 1 {
|
||||||
@ -153,6 +153,10 @@ var expirePreAuthKeyCmd = &cobra.Command{
|
|||||||
|
|
||||||
k, err := h.GetPreAuthKey(n, args[0])
|
k, err := h.GetPreAuthKey(n, args[0])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if strings.HasPrefix(o, "json") {
|
||||||
|
JsonOutput(k, err, o)
|
||||||
|
return
|
||||||
|
}
|
||||||
log.Fatalf("Error getting the key: %s", err)
|
log.Fatalf("Error getting the key: %s", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@ func (h *Headscale) ListMachinesInNamespace(name string) (*[]Machine, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
machines := []Machine{}
|
machines := []Machine{}
|
||||||
if err := h.db.Preload("AuthKey").Preload("Namespace").Where(&Machine{NamespaceID: n.ID}).Find(&machines).Error; err != nil {
|
if err := h.db.Preload("AuthKey").Preload("AuthKey.Namespace").Preload("Namespace").Where(&Machine{NamespaceID: n.ID}).Find(&machines).Error; err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return &machines, nil
|
return &machines, nil
|
||||||
|
Loading…
Reference in New Issue
Block a user