Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
blylei committed Nov 25, 2023
1 parent 72380bf commit bb49f3d
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 20 deletions.
20 changes: 6 additions & 14 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ builds:
env:
- CGO_ENABLED=0
ldflags:
- -s -w -X github.com/frabits/frabit/common/version.version={{ .Version }}
- -X github.com/frabits/frabit/common/version.commit={{ .ShortCommit }}
- -X github.com/frabits/frabit/common/version.buildDate={{ .CommitDate }}
- -s -w -X github.com/frabits/frabit/pkg/common/version.version={{ .Version }}
- -X github.com/frabits/frabit/common/pkg/version.commit={{ .ShortCommit }}
- -X github.com/frabits/frabit/common/pkg/version.buildDate={{ .CommitDate }}
- id: frabit-admin
main: ./admin
binary: frabit-admin
Expand All @@ -45,9 +45,9 @@ builds:
env:
- CGO_ENABLED=0
ldflags:
- -s -w -X github.com/frabits/frabit/common/version.version={{ .Version }}
- -X github.com/frabits/frabit/common/version.commit={{ .ShortCommit }}
- -X github.com/frabits/frabit/common/version.buildDate={{ .CommitDate }}
- -s -w -X github.com/frabits/frabit/pkg/common/version.version={{ .Version }}
- -X github.com/frabits/frabit/common/pkg/version.commit={{ .ShortCommit }}
- -X github.com/frabits/frabit/common/pkg/version.buildDate={{ .CommitDate }}
archives:

nfpms:
Expand All @@ -72,14 +72,6 @@ nfpms:
formats:
- deb
- rpm
contents:
- src: ./configs/frabit-server.yaml
dst: /etc/frabit-server/config.yml
type: 'config|noreplace'
- src: ./packages/frabit-server.service
dst: /etc/systemd/system/frabit-server.service
scripts:
postinstall: ./scripts/frabit-postinstall.sh
bindir: /usr/bin

section: default
Expand Down
4 changes: 2 additions & 2 deletions admin/cmd/admin/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ var CmdAdmin = &cobra.Command{
},
}

var resetAdminPassword = &cobra.Command{
var ResetAdminPassword = &cobra.Command{
Use: "reset-admin-password <new_password>",
Short: "Reset admin password at any time",
Run: runResetAdminPassword,
Expand All @@ -40,6 +40,6 @@ func runResetAdminPassword(cmd *cobra.Command, args []string) {
}

func init() {
CmdAdmin.AddCommand(resetAdminPassword)
CmdAdmin.AddCommand(ResetAdminPassword)
CmdAdmin.Flags().BoolP("toggle", "t", false, "Help message for toggle")
}
4 changes: 2 additions & 2 deletions agent/cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ package cmd

import (
"fmt"

"github.com/frabits/frabit/pkg/common/version"
"github.com/spf13/cobra"

_ "github.com/frabits/frabit/common"
"github.com/spf13/cobra"
)

var newVersionCmd = &cobra.Command{
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ require (
go.mongodb.org/mongo-driver v1.11.4
go.uber.org/zap v1.24.0
golang.org/x/crypto v0.8.0
golang.org/x/sync v0.1.0
google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef
google.golang.org/grpc v1.52.0
google.golang.org/protobuf v1.31.0
Expand Down Expand Up @@ -76,7 +77,6 @@ require (
go.uber.org/multierr v1.9.0 // indirect
golang.org/x/arch v0.0.0-20210923205945-b76863e36670 // indirect
golang.org/x/net v0.10.0 // indirect
golang.org/x/sync v0.1.0 // indirect
golang.org/x/sys v0.8.0 // indirect
golang.org/x/text v0.10.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
Expand Down
2 changes: 1 addition & 1 deletion scripts/buid.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

install -m=755 /usr/local/bin/
# install -m=755 /usr/local/bin/


install_exec(){
Expand Down

0 comments on commit bb49f3d

Please sign in to comment.