Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Rename ente-cli to ente

Neeraj Guptad3c07e0a177d
diff --git a/.goreleaser.yaml b/.goreleaser.yaml
index 47dbe1eb90..892c2ccdea 100644
--- a/.goreleaser.yaml
+++ b/.goreleaser.yaml
@@ -5,7 +5,7 @@
# Feel free to remove those if you don't want/need to use them.
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
-project_name: ente-cli
+project_name: ente
before:
hooks:
# You may remove this if you don't use go modules.
diff --git a/cmd/root.go b/cmd/root.go
index a3259e864f..277152167a 100644
--- a/cmd/root.go
+++ b/cmd/root.go
@@ -17,7 +17,7 @@ var ctrl *pkg.ClICtrl
// rootCmd represents the base command when called without any subcommands
var rootCmd = &cobra.Command{
- Use: "ente-cli",
+ Use: "ente",
Short: "CLI tool for exporting your photos from ente.io",
Long: `Start by creating a config file in your home directory:`,
// Uncomment the following line if your bare application
diff --git a/cmd/version.go b/cmd/version.go
index cb4d1cf47c..9d5194bc77 100644
--- a/cmd/version.go
+++ b/cmd/version.go
@@ -12,7 +12,7 @@ var versionCmd = &cobra.Command{
Short: "Prints the current version",
Long: ``,
Run: func(cmd *cobra.Command, args []string) {
- fmt.Printf("ente-cli version %s\n", AppVersion)
+ fmt.Printf("Version %s\n", AppVersion)
},
}
diff --git a/main.go b/main.go
index f02523f4b0..254b39b9d4 100644
--- a/main.go
+++ b/main.go
@@ -66,8 +66,7 @@ func GetCLIConfigPath() (string, error) {
return "", err
}
- // Create the path for the .ente-cli folder
- cliDBPath := filepath.Join(homeDir, ".ente-cli")
+ cliDBPath := filepath.Join(homeDir, ".ente")
// Check if the folder already exists, if not, create it
if _, err := os.Stat(cliDBPath); os.IsNotExist(err) {
diff --git a/pkg/account.go b/pkg/account.go
index 2fd505e70e..df45f3239a 100644
--- a/pkg/account.go
+++ b/pkg/account.go
@@ -73,7 +73,7 @@ func (c *ClICtrl) AddAccount(cxt context.Context) {
return
} else {
fmt.Println("Account added successfully")
- fmt.Println("run `ente-cli export` to initiate export of your account data")
+ fmt.Println("run `ente export` to initiate export of your account data")
}
}
diff --git a/pkg/cli.go b/pkg/cli.go
index 3d1ce49140..cc9c399371 100644
--- a/pkg/cli.go
+++ b/pkg/cli.go
@@ -17,7 +17,7 @@ type ClICtrl struct {
}
func (c *ClICtrl) Init() error {
- tempPath := filepath.Join(os.TempDir(), "ente-cli-download")
+ tempPath := filepath.Join(os.TempDir(), "ente-download")
// create temp folder if not exists
if _, err := os.Stat(tempPath); os.IsNotExist(err) {
err = os.Mkdir(tempPath, 0755)
diff --git a/pkg/secrets/secret.go b/pkg/secrets/secret.go
index 438b2a8ad3..1ebd13a1d6 100644
--- a/pkg/secrets/secret.go
+++ b/pkg/secrets/secret.go
@@ -17,9 +17,15 @@ func IsRunningInContainer() bool {
}
return true
}
+
+const (
+ secretService = "ente"
+ secretUser = "ente-cli-user"
+)
+
func GetOrCreateClISecret() []byte {
// get password
- secret, err := keyring.Get("ente-cli-cli", "ghost")
+ secret, err := keyring.Get(secretService, secretUser)
if err != nil {
if !errors.Is(err, keyring.ErrNotFound) {
if IsRunningInContainer() {
@@ -34,7 +40,7 @@ func GetOrCreateClISecret() []byte {
log.Fatal(fmt.Errorf("error generating key: %w", err))
}
secret = string(key)
- keySetErr := keyring.Set("ente-cli-cli", "ghost", string(secret))
+ keySetErr := keyring.Set(secretService, secretUser, string(secret))
if keySetErr != nil {
log.Fatal(fmt.Errorf("error setting password in keyring: %w", keySetErr))
}
diff --git a/release.sh b/release.sh
index 7c50473859..8e2deba0fe 100755
--- a/release.sh
+++ b/release.sh
@@ -20,11 +20,11 @@ do
export GOARCH="$ARCH"
# Set the output binary name to "ente-cli" for the current OS and architecture
- BINARY_NAME="ente-cli-$OS-$ARCH"
+ BINARY_NAME="ente-$OS-$ARCH"
# Add .exe extension for Windows
if [ "$OS" == "windows" ]; then
- BINARY_NAME="ente-cli-$OS-$ARCH.exe"
+ BINARY_NAME="ente-$OS-$ARCH.exe"
fi
# Build the binary and place it in the "bin" directory