From f6e37650118b494bb7487c2eaf053763b9f31eb7 Mon Sep 17 00:00:00 2001 From: Iuri de Silvio Date: Tue, 18 Dec 2018 10:42:17 -0200 Subject: [PATCH 01/25] Skip cloud or public folders if it does not exist. --- parsecmd/deploy.go | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/parsecmd/deploy.go b/parsecmd/deploy.go index b582241..1c738d8 100644 --- a/parsecmd/deploy.go +++ b/parsecmd/deploy.go @@ -42,6 +42,18 @@ func (d *deployCmd) getSourceFiles( suffixes map[string]struct{}, e *parsecli.Env, ) ([]string, []string, error) { + var selected []string + var ignored []string + + if _, err := os.Stat(dirName); os.IsNotExist(err) { + if d.Verbose { + fmt.Fprintf(e.Err, + "Skipping Source folder '%s' does not exist\n", + dirName) + } + return selected, ignored, nil + } + ignoreFile := filepath.Join(e.Root, parseIgnore) content, err := ioutil.ReadFile(ignoreFile) @@ -73,7 +85,6 @@ func (d *deployCmd) getSourceFiles( return nil, nil, stackerr.Wrap(err) } - var selected []string errors, err = parseIgnoreWalk(matcher, dirName, func(path string, info os.FileInfo, err error) error { @@ -101,7 +112,6 @@ func (d *deployCmd) getSourceFiles( ) } - var ignored []string for file := range ignoredSet { ignored = append(ignored, file) } @@ -378,7 +388,6 @@ func (d *deployCmd) deploy( return nil, err } } - scriptChecksums, scriptVersions, err := d.uploadSourceFiles(&uploader{ DirName: "cloud", Suffixes: map[string]struct{}{ From 04c196849916fab224be5c2d55cb188ca4131166 Mon Sep 17 00:00:00 2001 From: Iuri de Silvio Date: Tue, 18 Dec 2018 10:46:50 -0200 Subject: [PATCH 02/25] Release --- parsecli/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parsecli/main.go b/parsecli/main.go index d167f62..c4e4dcb 100644 --- a/parsecli/main.go +++ b/parsecli/main.go @@ -21,7 +21,7 @@ import ( ) const ( - Version = "3.1" + Version = "3.1.1" CloudDir = "cloud" HostingDir = "public" DefaultBaseURL = "https://parsecli.back4app.com/" From cde514fa68b63ca4d8c263816a21fa1205aa39a9 Mon Sep 17 00:00:00 2001 From: Iuri de Silvio Date: Tue, 18 Dec 2018 11:32:16 -0200 Subject: [PATCH 03/25] fix test --- parsecmd/deploy_test.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/parsecmd/deploy_test.go b/parsecmd/deploy_test.go index 0d5a703..e5fe380 100644 --- a/parsecmd/deploy_test.go +++ b/parsecmd/deploy_test.go @@ -176,12 +176,7 @@ func TestUploadFileNoFile(t *testing.T) { var d deployCmd _, err := d.uploadFile("cloud/master.js", "", h.Env, nil) - switch runtime.GOOS { - case "windows": - ensure.Err(t, err, regexp.MustCompile(`The system cannot find the path specified.`)) - default: - ensure.Err(t, err, regexp.MustCompile(`no such file or directory`)) - } + ensure.Err(t, err, regexp.MustCompile(`No files to upload`)) } func TestUploadFileHttpError(t *testing.T) { From fa4136e2b0f1158a9c1f527186f70a1619b1a3af Mon Sep 17 00:00:00 2001 From: Iuri de Silvio Date: Tue, 18 Dec 2018 11:34:32 -0200 Subject: [PATCH 04/25] Fix tests --- parsecmd/deploy_test.go | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/parsecmd/deploy_test.go b/parsecmd/deploy_test.go index e5fe380..03fd857 100644 --- a/parsecmd/deploy_test.go +++ b/parsecmd/deploy_test.go @@ -176,7 +176,12 @@ func TestUploadFileNoFile(t *testing.T) { var d deployCmd _, err := d.uploadFile("cloud/master.js", "", h.Env, nil) - ensure.Err(t, err, regexp.MustCompile(`No files to upload`)) + switch runtime.GOOS { + case "windows": + ensure.Err(t, err, regexp.MustCompile(`The system cannot find the path specified.`)) + default: + ensure.Err(t, err, regexp.MustCompile(`no such file or directory`)) + } } func TestUploadFileHttpError(t *testing.T) { @@ -645,22 +650,22 @@ func TestDeployRetries(t *testing.T) { ctx := parsecli.Context{Config: defaultParseConfig} ctx.Config.GetProjectConfig().Parse.JSSDK = "latest" - ensure.Err(t, d.run(h.Env, &ctx), regexp.MustCompile("no such file or directory")) + ensure.Err(t, d.run(h.Env, &ctx), regexp.MustCompile("No files to upload")) ensure.DeepEqual(t, h.Err.String(), "") h.Err.Reset() d.Retries = 2 - ensure.Err(t, d.run(h.Env, &ctx), regexp.MustCompile("no such file or directory")) + ensure.Err(t, d.run(h.Env, &ctx), regexp.MustCompile("No files to upload")) ensure.DeepEqual( t, h.Err.String(), - "Deploy failed with error:\nlstat cloud: no such file or directory\nWill retry in 0 seconds.\n\n", + "Deploy failed with error:\nNo files to upload\nWill retry in 0 seconds.\n\n", ) h.Err.Reset() d.Retries = 5 - ensure.Err(t, d.run(h.Env, &ctx), regexp.MustCompile("no such file or directory")) - errStr := "Deploy failed with error:\nlstat cloud: no such file or directory\nWill retry in 0 seconds.\n\n" + ensure.Err(t, d.run(h.Env, &ctx), regexp.MustCompile("No files to upload")) + errStr := "Deploy failed with error:\nNo files to upload\nWill retry in 0 seconds.\n\n" errStr += strings.Repeat("Sorry, deploy failed again with same error.\nWill retry in 0 seconds.\n\n", 3) ensure.DeepEqual(t, h.Err.String(), errStr) } From d0919f6088a634603d8ea4df0757ff38b827fbfe Mon Sep 17 00:00:00 2001 From: Ricardo Paiva Date: Thu, 8 Aug 2019 16:50:01 -0300 Subject: [PATCH 05/25] add build and run homolog --- .gitignore | 1 + build_debug.sh | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 .gitignore create mode 100755 build_debug.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9f11b75 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.idea/ diff --git a/build_debug.sh b/build_debug.sh new file mode 100755 index 0000000..e4059bc --- /dev/null +++ b/build_debug.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash +this_dir=$(pwd) +export PATH=$HOME/gopath/bin:$PATH +rsync -az ./ $HOME/gopath/src/github.com/back4app/parse-cli/ +cd $HOME/gopath/src/github.com/back4app/parse-cli +go get -t -v ./ +echo Version $(parse-cli version) installed locally +rm -rf $HOME/gopath/bin/b4a-homolog +ln -s $HOME/gopath/bin/parse-cli $HOME/gopath/bin/b4a-homolog +cd $this_dir \ No newline at end of file From 7123592ad07d47bc8c10bed36cbe28a03318adcb Mon Sep 17 00:00:00 2001 From: Ricardo Paiva Date: Thu, 8 Aug 2019 17:01:23 -0300 Subject: [PATCH 06/25] Fix build debug locally --- build_debug.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build_debug.sh b/build_debug.sh index e4059bc..19462c2 100755 --- a/build_debug.sh +++ b/build_debug.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash this_dir=$(pwd) +export GOPATH=$HOME/gopath export PATH=$HOME/gopath/bin:$PATH rsync -az ./ $HOME/gopath/src/github.com/back4app/parse-cli/ cd $HOME/gopath/src/github.com/back4app/parse-cli @@ -7,4 +8,4 @@ go get -t -v ./ echo Version $(parse-cli version) installed locally rm -rf $HOME/gopath/bin/b4a-homolog ln -s $HOME/gopath/bin/parse-cli $HOME/gopath/bin/b4a-homolog -cd $this_dir \ No newline at end of file +cd $this_dir From 91151a0dcd3b5325e35e617340b5b8697d96a527 Mon Sep 17 00:00:00 2001 From: Ricardo Paiva Date: Thu, 8 Aug 2019 17:07:22 -0300 Subject: [PATCH 07/25] Deploy any extention on cloud folder --- parsecmd/deploy.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/parsecmd/deploy.go b/parsecmd/deploy.go index 1c738d8..0ee1319 100644 --- a/parsecmd/deploy.go +++ b/parsecmd/deploy.go @@ -390,13 +390,7 @@ func (d *deployCmd) deploy( } scriptChecksums, scriptVersions, err := d.uploadSourceFiles(&uploader{ DirName: "cloud", - Suffixes: map[string]struct{}{ - ".js": {}, - ".ejs": {}, - ".jade": {}, - ".pug": {}, // jade now is pug - ".json": {}, - }, + Suffixes: map[string]struct{}{}, EndPoint: "scripts", PrevChecksums: prevDeplInfo.Checksums.Cloud, PrevVersions: prevDeplInfo.Versions.Cloud, From 29563b408803163496cecf0b4c9bcdba7e1e7461 Mon Sep 17 00:00:00 2001 From: Ricardo Paiva Date: Thu, 8 Aug 2019 17:08:02 -0300 Subject: [PATCH 08/25] Deploy any extention on cloud folder --- parsecli/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parsecli/main.go b/parsecli/main.go index c4e4dcb..bed3bad 100644 --- a/parsecli/main.go +++ b/parsecli/main.go @@ -21,7 +21,7 @@ import ( ) const ( - Version = "3.1.1" + Version = "3.2.0" CloudDir = "cloud" HostingDir = "public" DefaultBaseURL = "https://parsecli.back4app.com/" From d83156292941e9d2aefb059e435504b4a9c0127b Mon Sep 17 00:00:00 2001 From: Ricardo Paiva Date: Fri, 9 Aug 2019 13:55:28 -0300 Subject: [PATCH 09/25] Fix tests --- parsecmd/deploy_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parsecmd/deploy_test.go b/parsecmd/deploy_test.go index 03fd857..3255223 100644 --- a/parsecmd/deploy_test.go +++ b/parsecmd/deploy_test.go @@ -530,7 +530,7 @@ func TestDeployFilesUnChanged(t *testing.T) { expected := &deployInfo{ ParseVersion: "latest", Checksums: deployFileData{ - Cloud: map[string]string{"main.js": "4ece160cc8e5e828ee718e7367cf5d37"}, + Cloud: map[string]string{"sample.txt": "d41d8cd98f00b204e9800998ecf8427e", "main.js": "4ece160cc8e5e828ee718e7367cf5d37"}, Public: map[string]string{"index.html": "9e2354a0ebac5852bc674026137c8612"}, }, Versions: deployFileData{ @@ -570,7 +570,7 @@ func TestDeployFilesNoVersion(t *testing.T) { expected := &deployInfo{ ParseVersion: "latest", Checksums: deployFileData{ - Cloud: map[string]string{"main.js": "4ece160cc8e5e828ee718e7367cf5d37"}, + Cloud: map[string]string{"sample.txt": "d41d8cd98f00b204e9800998ecf8427e", "main.js": "4ece160cc8e5e828ee718e7367cf5d37"}, Public: map[string]string{"index.html": "9e2354a0ebac5852bc674026137c8612"}, }, Versions: deployFileData{ From e5f3c4a942ba8cf8c3e8fb28e3e76f6ed7a87c66 Mon Sep 17 00:00:00 2001 From: Ricardo Paiva Date: Fri, 9 Aug 2019 13:56:15 -0300 Subject: [PATCH 10/25] Fix tests --- parsecmd/deploy_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parsecmd/deploy_test.go b/parsecmd/deploy_test.go index 3255223..d07e4e0 100644 --- a/parsecmd/deploy_test.go +++ b/parsecmd/deploy_test.go @@ -467,7 +467,7 @@ func TestDeployFilesChanged(t *testing.T) { expected := &deployInfo{ ParseVersion: "latest", Checksums: deployFileData{ - Cloud: map[string]string{"main.js": "4ece160cc8e5e828ee718e7367cf5d37"}, + Cloud: map[string]string{"main.js": "4ece160cc8e5e828ee718e7367cf5d37", "sample.txt": "d41d8cd98f00b204e9800998ecf8427e"}, Public: map[string]string{"index.html": "9e2354a0ebac5852bc674026137c8612"}, }, Versions: deployFileData{ From 9d347068781550fa899329315cf3089afb53b750 Mon Sep 17 00:00:00 2001 From: Ricardo Paiva Date: Fri, 9 Aug 2019 14:11:51 -0300 Subject: [PATCH 11/25] Fix tests --- parsecmd/deploy_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parsecmd/deploy_test.go b/parsecmd/deploy_test.go index d07e4e0..88a98ae 100644 --- a/parsecmd/deploy_test.go +++ b/parsecmd/deploy_test.go @@ -467,7 +467,7 @@ func TestDeployFilesChanged(t *testing.T) { expected := &deployInfo{ ParseVersion: "latest", Checksums: deployFileData{ - Cloud: map[string]string{"main.js": "4ece160cc8e5e828ee718e7367cf5d37", "sample.txt": "d41d8cd98f00b204e9800998ecf8427e"}, + Cloud: map[string]string{"sample.txt": "d41d8cd98f00b204e9800998ecf8427e", "main.js": "4ece160cc8e5e828ee718e7367cf5d37"}, Public: map[string]string{"index.html": "9e2354a0ebac5852bc674026137c8612"}, }, Versions: deployFileData{ @@ -530,7 +530,7 @@ func TestDeployFilesUnChanged(t *testing.T) { expected := &deployInfo{ ParseVersion: "latest", Checksums: deployFileData{ - Cloud: map[string]string{"sample.txt": "d41d8cd98f00b204e9800998ecf8427e", "main.js": "4ece160cc8e5e828ee718e7367cf5d37"}, + Cloud: map[string]string{"main.js": "4ece160cc8e5e828ee718e7367cf5d37", "sample.txt": "d41d8cd98f00b204e9800998ecf8427e"}, Public: map[string]string{"index.html": "9e2354a0ebac5852bc674026137c8612"}, }, Versions: deployFileData{ From c5c69712155034bbd6bb9b4554ad16197c96c6ca Mon Sep 17 00:00:00 2001 From: Ricardo Paiva Date: Fri, 9 Aug 2019 14:21:34 -0300 Subject: [PATCH 12/25] Fix tests --- parsecmd/deploy_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/parsecmd/deploy_test.go b/parsecmd/deploy_test.go index 88a98ae..9162fa3 100644 --- a/parsecmd/deploy_test.go +++ b/parsecmd/deploy_test.go @@ -471,7 +471,7 @@ func TestDeployFilesChanged(t *testing.T) { Public: map[string]string{"index.html": "9e2354a0ebac5852bc674026137c8612"}, }, Versions: deployFileData{ - Cloud: map[string]string{"main.js": "f2"}, + Cloud: map[string]string{"sample.txt": "f2", """main.js": "f2"}, Public: map[string]string{"index.html": "f2"}, }, } @@ -530,11 +530,11 @@ func TestDeployFilesUnChanged(t *testing.T) { expected := &deployInfo{ ParseVersion: "latest", Checksums: deployFileData{ - Cloud: map[string]string{"main.js": "4ece160cc8e5e828ee718e7367cf5d37", "sample.txt": "d41d8cd98f00b204e9800998ecf8427e"}, + Cloud: map[string]string{"sample.txt": "d41d8cd98f00b204e9800998ecf8427e", "main.js": "4ece160cc8e5e828ee718e7367cf5d37"}, Public: map[string]string{"index.html": "9e2354a0ebac5852bc674026137c8612"}, }, Versions: deployFileData{ - Cloud: map[string]string{"main.js": "f2"}, + Cloud: map[string]string{"main.js": "f2", "main.js": "f2"}, Public: map[string]string{"index.html": "f2"}, }, } @@ -570,11 +570,11 @@ func TestDeployFilesNoVersion(t *testing.T) { expected := &deployInfo{ ParseVersion: "latest", Checksums: deployFileData{ - Cloud: map[string]string{"sample.txt": "d41d8cd98f00b204e9800998ecf8427e", "main.js": "4ece160cc8e5e828ee718e7367cf5d37"}, + Cloud: map[string]string{"main.js": "4ece160cc8e5e828ee718e7367cf5d37", "sample.txt": "d41d8cd98f00b204e9800998ecf8427e"}, Public: map[string]string{"index.html": "9e2354a0ebac5852bc674026137c8612"}, }, Versions: deployFileData{ - Cloud: map[string]string{"main.js": "f2"}, + Cloud: map[string]string{"sample.txt": "f2", "main.js": "f2"}, Public: map[string]string{"index.html": "f2"}, }, } From d34a08dc1836488eb7b9f1718cfb8b4ba8a2f020 Mon Sep 17 00:00:00 2001 From: Ricardo Paiva Date: Fri, 9 Aug 2019 14:24:26 -0300 Subject: [PATCH 13/25] Fix tests --- parsecmd/deploy_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parsecmd/deploy_test.go b/parsecmd/deploy_test.go index 9162fa3..9a1a7ec 100644 --- a/parsecmd/deploy_test.go +++ b/parsecmd/deploy_test.go @@ -471,7 +471,7 @@ func TestDeployFilesChanged(t *testing.T) { Public: map[string]string{"index.html": "9e2354a0ebac5852bc674026137c8612"}, }, Versions: deployFileData{ - Cloud: map[string]string{"sample.txt": "f2", """main.js": "f2"}, + Cloud: map[string]string{"sample.txt": "f2", "main.js": "f2"}, Public: map[string]string{"index.html": "f2"}, }, } From 6102530c50cb76c501aae05c2fcfd5a800408100 Mon Sep 17 00:00:00 2001 From: Ricardo Paiva Date: Fri, 9 Aug 2019 14:34:28 -0300 Subject: [PATCH 14/25] Fix tests --- parsecmd/deploy_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parsecmd/deploy_test.go b/parsecmd/deploy_test.go index 9a1a7ec..c9a119c 100644 --- a/parsecmd/deploy_test.go +++ b/parsecmd/deploy_test.go @@ -534,7 +534,7 @@ func TestDeployFilesUnChanged(t *testing.T) { Public: map[string]string{"index.html": "9e2354a0ebac5852bc674026137c8612"}, }, Versions: deployFileData{ - Cloud: map[string]string{"main.js": "f2", "main.js": "f2"}, + Cloud: map[string]string{"sample.txt": "f2", "main.js": "f2"}, Public: map[string]string{"index.html": "f2"}, }, } From 4ee5d70e6f85c4f30508f50347b38df5b5b7034a Mon Sep 17 00:00:00 2001 From: Ricardo Paiva Date: Fri, 9 Aug 2019 15:01:16 -0300 Subject: [PATCH 15/25] Fix tests --- configure.go | 17 ++++++----------- configure_test.go | 2 +- parsecli/login.go | 13 +++---------- parsecmd/deploy_test.go | 18 +++++++++++------- parsecmd/new.go | 8 ++------ 5 files changed, 23 insertions(+), 35 deletions(-) diff --git a/configure.go b/configure.go index 42e2bbf..ca7423f 100644 --- a/configure.go +++ b/configure.go @@ -29,7 +29,7 @@ func (c *configureCmd) accountKey(e *parsecli.Env) error { email, err := c.login.AuthToken(e, token) if err != nil { - fmt.Fprintln(e.Err, "Could not store credentials. Please try again.\n") + fmt.Fprintln(e.Err, "Could not store credentials. Please try again.") return err } @@ -80,17 +80,13 @@ for email: %q } if firstEverConfigure { - fmt.Fprintln( - e.Out, - ` -Looks like this is the first time you have configured an account key. + fmt.Fprintln(e.Out, `Looks like this is the first time you have configured an account key. Note that "b4a new" and "b4a list" can automatically pick up a default key if present. Otherwise, you'll have to explicitly set the PARSER_EMAIL common.Environment variable for them to pick the correct account key. Further, if the command line tool cannot find an account key for a configured email it will try to use the default account key. -Hence, we are automatically configuring the default account key to be the same as current account key. -`, +Hence, we are automatically configuring the default account key to be the same as current account key.`, ) err = c.login.StoreCredentials(e, "", &parsecli.Credentials{Token: token}) if err != nil { @@ -100,8 +96,7 @@ Hence, we are automatically configuring the default account key to be the same a fmt.Fprintln(e.Out, `Successfully configured the default account key. To change the default account key in future use: - "b4a configure accountkey -d" -`) + "b4a configure accountkey -d"`) } return nil @@ -139,7 +134,7 @@ func (c *configureCmd) projectType(e *parsecli.Env, args []string) error { if len(args) != 0 { projectType, ok := validTypes[args[0]] if !ok { - return stackerr.Newf("Invalid projectType: %v, valid types are: \n%s", selectionString) + return stackerr.Newf("Invalid projectType: %v, valid types are: \n%s", projectType, selectionString) } selectedProjectType = projectType } @@ -160,7 +155,7 @@ Enter a number between 1 and %d: `, } projectType, ok := validTypes[validKeys[num-1]] if !ok { - return stackerr.Newf("Invalid projectType: %v, valid types are: \n%s", selectionString) + return stackerr.Newf("Invalid projectType: %v, valid types are: \n%s", projectType, selectionString) } selectedProjectType = projectType break diff --git a/configure_test.go b/configure_test.go index d9f2b0b..e597085 100644 --- a/configure_test.go +++ b/configure_test.go @@ -32,7 +32,7 @@ Input your account key or press ENTER to generate a new one. ensure.Err(t, c.accountKey(h.Env), regexp.MustCompile("is not valid")) ensure.DeepEqual(t, h.Err.String(), - "Could not store credentials. Please try again.\n\n", + "Could not store credentials. Please try again.\n", ) h.Env.Server = "http://api.parse.com/1/" diff --git a/parsecli/login.go b/parsecli/login.go index a87770d..fefe35c 100644 --- a/parsecli/login.go +++ b/parsecli/login.go @@ -242,17 +242,10 @@ func (l *Login) AuthUserWithToken(e *Env, strict bool) (string, error) { // user never created an account key: educate them if stackerr.HasUnderlying(err, stackerr.MatcherFunc(os.IsNotExist)) { if strict { - fmt.Fprintln( - e.Out, - `To proceed further, you must configure an account key. -`, - ) + fmt.Fprintln(e.Out, `To proceed further, you must configure an account key.`,) } else { - fmt.Fprintln( - e.Out, - `We've changed the way the CLI works. -To save time logging in, you should create an account key. -`, + fmt.Fprintln(e.Out, `We've changed the way the CLI works. +To save time logging in, you should create an account key.`, ) } diff --git a/parsecmd/deploy_test.go b/parsecmd/deploy_test.go index c9a119c..f967c50 100644 --- a/parsecmd/deploy_test.go +++ b/parsecmd/deploy_test.go @@ -492,9 +492,11 @@ The following files will be ignored: Finished uploading files New release is named v1 (using Parse JavaScript SDK vlatest) `, - filepath.Join(h.Env.Root, parsecli.CloudDir, "main.js"), strings.Join([]string{ - filepath.Join(h.Env.Root, parsecli.CloudDir, "sample.txt"), + filepath.Join(h.Env.Root, parsecli.CloudDir, "main.js"), + filepath.Join(h.Env.Root, parsecli.CloudDir, "sample.txt")}, + "\n"), + strings.Join([]string{ filepath.Join(h.Env.Root, parsecli.CloudDir, "test~")}, "\n"), filepath.Join(h.Env.Root, parsecli.HostingDir, "index.html"), @@ -511,11 +513,11 @@ func TestDeployFilesUnChanged(t *testing.T) { info := &deployInfo{ ParseVersion: "latest", Checksums: deployFileData{ - Cloud: map[string]string{"main.js": "4ece160cc8e5e828ee718e7367cf5d37"}, + Cloud: map[string]string{"sample.txt": "d41d8cd98f00b204e9800998ecf8427e", "main.js": "4ece160cc8e5e828ee718e7367cf5d37"}, Public: map[string]string{"index.html": "9e2354a0ebac5852bc674026137c8612"}, }, Versions: deployFileData{ - Cloud: map[string]string{"main.js": "f2"}, + Cloud: map[string]string{"sample.txt": "f2", "main.js": "f2"}, Public: map[string]string{"index.html": "f2"}, }, } @@ -570,7 +572,7 @@ func TestDeployFilesNoVersion(t *testing.T) { expected := &deployInfo{ ParseVersion: "latest", Checksums: deployFileData{ - Cloud: map[string]string{"main.js": "4ece160cc8e5e828ee718e7367cf5d37", "sample.txt": "d41d8cd98f00b204e9800998ecf8427e"}, + Cloud: map[string]string{"sample.txt": "d41d8cd98f00b204e9800998ecf8427e", "main.js": "4ece160cc8e5e828ee718e7367cf5d37"}, Public: map[string]string{"index.html": "9e2354a0ebac5852bc674026137c8612"}, }, Versions: deployFileData{ @@ -596,9 +598,11 @@ The following files will be ignored: Finished uploading files New release is named v1 (using Parse JavaScript SDK vlatest) `, - filepath.Join(h.Env.Root, parsecli.CloudDir, "main.js"), strings.Join([]string{ - filepath.Join(h.Env.Root, parsecli.CloudDir, "sample.txt"), + filepath.Join(h.Env.Root, parsecli.CloudDir, "main.js"), + filepath.Join(h.Env.Root, parsecli.CloudDir, "sample.txt")}, + "\n"), + strings.Join([]string{ filepath.Join(h.Env.Root, parsecli.CloudDir, "test~")}, "\n"), filepath.Join(h.Env.Root, parsecli.HostingDir, "index.html"), diff --git a/parsecmd/new.go b/parsecmd/new.go index 0754f5e..d407839 100644 --- a/parsecmd/new.go +++ b/parsecmd/new.go @@ -31,13 +31,9 @@ func CloneSampleCloudCode( if err == errNoFiles { dumpTemplate = true } else { - fmt.Fprintln( - e.Out, - ` -NOTE: If you like to fetch the latest deployed Cloud Code from Parse, + fmt.Fprintln(e.Out, `NOTE: If you like to fetch the latest deployed Cloud Code from Parse, you can use the "b4a download" command after finishing the set up. -This will download Cloud Code to a temporary location. -`, +This will download Cloud Code to a temporary location.`, ) } } From 3e695f42940cf03d498394ff669e65ecb726e412 Mon Sep 17 00:00:00 2001 From: Ricardo Paiva Date: Fri, 9 Aug 2019 15:48:30 -0300 Subject: [PATCH 16/25] Change deploy key --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 489c623..25c09fb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,8 @@ before_deploy: deploy: provider: releases api_key: - secure: "CJMqOWtrUzSAjY3jif+jIU/dlocZ+2ylAgRcPq7JV6yPM3/XyZ8i09lkzM7IrGL/KQd9ZvDuyLHAJJTtzuvgOTc8QtJLrS88hj/5lE/6uahJ8F63SlLJJ3RFPsV0DPVMpP65Azl+poZBLsjrbjaj2AlAYJl1j2FVd8CxfMIrGaLbnQARhU+HgDukrXTpIf9GMOHeEat8/oORPXpahQwfoZDb8WXZIYnG/SLZDegzZMb+281ErzLcaSfZrBnKGSPbidZQvdBYwZQqRNTXN+PLHIdMqaVckilpHi3uh4McTLs9hu8TiwxxZWFvhH4BA8BG/pcKZ6hAJXseHiOef7WAII6Btb3gE7SSKTuH0DFsEa0LvUhW1se/MTOOMxhVaSSxskpNG1UUFnQXpdabKMP9N7ZbTT7SOpMZsEsGdHPh6P9lJ5OsVogo+YLABEqgAHWtuXWBj1/g0iWUglaCBPQZcdOJWd8C0bYHsEAk+O+SovtFKXPSKtEh6OJajv+8K63GRrpnQvlMQcXg6PKlFMJBr8atpcOpdV6Ld3yFHIO0kTa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W4eE9zShBsYP1BpblwI6xwhIgyRScnAVWY5bqrRMdCoiX0A5UE3+2PcJactsHWNKBwG4Ye9X7mbHwAniNheBl08lcuo3v7ugQx0M5HxDwyXEb0emBOkfxasPgPfkfM1YUXAAAAFmNvbW11bml0eUBiYWNrNGFwcC5jb20BAgME" +# secure: "CJMqOWtrUzSAjY3jif+jIU/dlocZ+2ylAgRcPq7JV6yPM3/XyZ8i09lkzM7IrGL/KQd9ZvDuyLHAJJTtzuvgOTc8QtJLrS88hj/5lE/6uahJ8F63SlLJJ3RFPsV0DPVMpP65Azl+poZBLsjrbjaj2AlAYJl1j2FVd8CxfMIrGaLbnQARhU+HgDukrXTpIf9GMOHeEat8/oORPXpahQwfoZDb8WXZIYnG/SLZDegzZMb+281ErzLcaSfZrBnKGSPbidZQvdBYwZQqRNTXN+PLHIdMqaVckilpHi3uh4McTLs9hu8TiwxxZWFvhH4BA8BG/pcKZ6hAJXseHiOef7WAII6Btb3gE7SSKTuH0DFsEa0LvUhW1se/MTOOMxhVaSSxskpNG1UUFnQXpdabKMP9N7ZbTT7SOpMZsEsGdHPh6P9lJ5OsVogo+YLABEqgAHWtuXWBj1/g0iWUglaCBPQZcdOJWd8C0bYHsEAk+O+SovtFKXPSKtEh6OJajv+8K63GRrpnQvlMQcXg6PKlFMJBr8atpcOpdV6Ld3yFHIO0kTaEn2uZc3j5yt2GVS4M3wEpQ/eeFns6asEXg2gkwQgQh68Dc1jSoKMy/4ffbCV4LHEJn0QnowZ+T4gb4wXLIsYVFCX020HZbqA3gnJoRkgdh1P5HHr7fyN+gQPWHOnDHto=" file: - b4a From 7d28faa89fd90f31c7ea201a6f2a85bdfad1735f Mon Sep 17 00:00:00 2001 From: Ricardo Paiva Date: Fri, 9 Aug 2019 16:45:12 -0300 Subject: [PATCH 17/25] Change deploy key --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 25c09fb..d6b2a76 100644 --- a/.travis.yml +++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69sF7A8NH1Pnn6p+50HQVXsT201uNCKFvqf4B3uxGEAs4qpcptgOfyh16q0wanD8A7vR7+tvjWFi0XMhPGFpxXTyZz9WygBB76o7S+PcoFJt9spYmEuxhWrirfVF4zNBj0iTZvyFhdRtCCcvLJAPhtaXaUjUd0DF+H7iLfia4Mwp0iejvLqzNKedfgoK9pDMfSgac7SRq6+Fm84Gp6ORpTna+kVHsY0UO3sZZ5j23dwo9bmnDIH/QJVdZdiShsERuwATMQH5biUzbTR6BWYR+yDV3yUuZiYRr//kda61eK1CDLwx2YybcDv2ikVKgMdt19TfpCF3IkUE1HncSJkegSxmgZaXAvqqeqvDyV7IksdCYQ64UjTBdpcycQUdFWEyU=" file: - b4a From 6ab507dc59c3465c36a7ccd13f4937650b778b73 Mon Sep 17 00:00:00 2001 From: nataliaconde Date: Thu, 5 Dec 2019 12:30:40 -0300 Subject: [PATCH 18/25] Change cloud function to 3.x --- parsecli/main.go | 2 +- parsecli/utils.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/parsecli/main.go b/parsecli/main.go index bed3bad..adb1c93 100644 --- a/parsecli/main.go +++ b/parsecli/main.go @@ -21,7 +21,7 @@ import ( ) const ( - Version = "3.2.0" + Version = "3.2.1" CloudDir = "cloud" HostingDir = "public" DefaultBaseURL = "https://parsecli.back4app.com/" diff --git a/parsecli/utils.go b/parsecli/utils.go index f42a1ff..a6738b5 100644 --- a/parsecli/utils.go +++ b/parsecli/utils.go @@ -18,8 +18,8 @@ const ( SampleSource = ` // Use Parse.Cloud.define to define as many cloud functions as you want. // For example: -Parse.Cloud.define("hello", function(request, response) { - response.success("Hello world!"); +Parse.Cloud.define("hello", (request) => { + return "Hello world!"; }); ` From 14367fbc1a573b60bdd9a3ec1e27d96f7353e2dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nat=C3=A1lia=20Cond=C3=AA?= <32825972+nataliaconde@users.noreply.github.com> Date: Mon, 9 Dec 2019 10:06:45 -0300 Subject: [PATCH 19/25] Update cli version to 3.3.0 --- parsecli/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parsecli/main.go b/parsecli/main.go index adb1c93..6accf32 100644 --- a/parsecli/main.go +++ b/parsecli/main.go @@ -21,7 +21,7 @@ import ( ) const ( - Version = "3.2.1" + Version = "3.3.0" CloudDir = "cloud" HostingDir = "public" DefaultBaseURL = "https://parsecli.back4app.com/" From 5190bf0222dd0facf8b970b69a9db0840c6ebc2c Mon Sep 17 00:00:00 2001 From: nataliaconde Date: Mon, 9 Dec 2019 15:10:16 -0300 Subject: [PATCH 20/25] Add new CLI version 3.3.1 --- parsecli/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parsecli/main.go b/parsecli/main.go index 6accf32..8deeff1 100644 --- a/parsecli/main.go +++ b/parsecli/main.go @@ -21,7 +21,7 @@ import ( ) const ( - Version = "3.3.0" + Version = "3.3.1" CloudDir = "cloud" HostingDir = "public" DefaultBaseURL = "https://parsecli.back4app.com/" From a9fccf077dde8086b4c147e5d612258d32f6b278 Mon Sep 17 00:00:00 2001 From: alexvenom Date: Thu, 15 Apr 2021 14:31:07 -0300 Subject: [PATCH 21/25] Added Bitbucket Pipeline yaml file for reference of users --- ci_cd/bitbucket_pipeline.yaml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 ci_cd/bitbucket_pipeline.yaml diff --git a/ci_cd/bitbucket_pipeline.yaml b/ci_cd/bitbucket_pipeline.yaml new file mode 100644 index 0000000..5f9ae9d --- /dev/null +++ b/ci_cd/bitbucket_pipeline.yaml @@ -0,0 +1,34 @@ +image: back4app/b4a_cli:latest +pipelines: + branches: + master: + - step: + name: Install dependencies + script: + - apt-get update -y + - apt-get install -y build-essential + - apt-get install -y checkinstall + - apt-get install -y libssl-dev + - apt-get install -y curl + - apt-get install -y sudo + - apt-get install -y python + - apt-get install -y wget + - apt-get install -y git + - which git + - cd /opt + - wget https://golang.org/dl/go1.12.17.linux-amd64.tar.gz + - tar zxf go1.12.17.linux-amd64.tar.gz + - export PATH=/opt/go/bin:$PATH + - export GOPATH=/go + - mkdir -p /go/src/github.com/back4app + - /usr/bin/git clone -b back4app https://github.com/back4app/parse-cli.git $GOPATH/src/github.com/back4app + - cd $GOPATH/src/github.com/back4app + - go get ./... + - GOOS=linux GOARCH=amd64 go build -o b4a_64 + - cd $GOPATH/src/github.com/back4app + - chmod 755 $GOPATH/src/github.com/back4app/b4a_64 + - ls -la $GOPATH/src/github.com/back4app/b4a_64 + - $GOPATH/src/github.com/back4app/b4a_64 version + - file $GOPATH/src/github.com/back4app/b4a_64 + - mv $GOPATH/src/github.com/back4app/b4a_64 /usr/local/bin/b4a + - /usr/local/bin/b4a version \ No newline at end of file From 6c093adb09dbd54362d47942058533e8fd29a481 Mon Sep 17 00:00:00 2001 From: Charles Ramos Date: Wed, 14 Jul 2021 13:02:29 -0300 Subject: [PATCH 22/25] update installer (#27) --- installer.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/installer.sh b/installer.sh index b6f65dd..b888033 100755 --- a/installer.sh +++ b/installer.sh @@ -10,14 +10,15 @@ echo "Fetching latest version ..." # latest="3.0.6-beta-5" latest=$(curl https://parsecli.back4app.com/supported?version=latest | python -c "import sys, json; print(json.load(sys.stdin)['version'])") -case `uname` in - "Linux" ) +case `uname -p` in + "x86_64" ) url="https://github.com/back4app/parse-cli/releases/download/release_${latest}/b4a_linux";; - "Darwin" ) + "i386" ) url="https://github.com/back4app/parse-cli/releases/download/release_${latest}/b4a";; + "arm" ) + url="https://github.com/back4app/parse-cli/releases/download/release_${latest}/b4a_mac_m1";; esac - echo "Version ${latest} will be installed" curl --progress-bar --compressed -Lo ${TMP_FILE} ${url} From ec307407b36d4dfd07f722e1ef3a851aafd20069 Mon Sep 17 00:00:00 2001 From: Charles Ramos Date: Fri, 16 Jul 2021 16:52:06 -0300 Subject: [PATCH 23/25] Update installer for node:alpine (#31) * update installer * update installer for node:alpine * update installer for node:alpine * Update installer.sh --- installer.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/installer.sh b/installer.sh index b888033..9837fa7 100755 --- a/installer.sh +++ b/installer.sh @@ -10,12 +10,16 @@ echo "Fetching latest version ..." # latest="3.0.6-beta-5" latest=$(curl https://parsecli.back4app.com/supported?version=latest | python -c "import sys, json; print(json.load(sys.stdin)['version'])") -case `uname -p` in - "x86_64" ) +case `uname -pm` in + "x86_64 x86_64" ) url="https://github.com/back4app/parse-cli/releases/download/release_${latest}/b4a_linux";; - "i386" ) + "x86_64 unknown" ) + url="https://github.com/back4app/parse-cli/releases/download/release_${latest}/b4a_linux";; + "x86_64 i386" ) url="https://github.com/back4app/parse-cli/releases/download/release_${latest}/b4a";; - "arm" ) + "aarch64 unknown" ) + url="https://github.com/back4app/parse-cli/releases/download/release_${latest}/b4a_linux";; + "arm64 arm" ) url="https://github.com/back4app/parse-cli/releases/download/release_${latest}/b4a_mac_m1";; esac From 2f5a98d7476766febc0f01e25aadf60239534aad Mon Sep 17 00:00:00 2001 From: charles-ramos Date: Wed, 30 Aug 2023 17:30:46 -0300 Subject: [PATCH 24/25] adding support to multiple python versions --- installer.sh | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/installer.sh b/installer.sh index 9837fa7..e48b492 100755 --- a/installer.sh +++ b/installer.sh @@ -7,8 +7,18 @@ if [ -e ${TMP_FILE} ]; then fi echo "Fetching latest version ..." -# latest="3.0.6-beta-5" -latest=$(curl https://parsecli.back4app.com/supported?version=latest | python -c "import sys, json; print(json.load(sys.stdin)['version'])") +if command -v python3 &>/dev/null; then + PYTHON_EXECUTABLE="python3" +elif command -v python &>/dev/null; then + PYTHON_EXECUTABLE="python" +elif command -v python2 &>/dev/null; then + PYTHON_EXECUTABLE="python" +else + echo "Python not found" + exit 1 +fi + +latest=$(curl https://parsecli.back4app.com/supported?version=latest | $PYTHON_EXECUTABLE -c "import sys, json; print(json.load(sys.stdin)['version'])") case `uname -pm` in "x86_64 x86_64" ) @@ -35,4 +45,4 @@ echo "Installing ..." mv /tmp/back4app.tmp /usr/local/bin/b4a chmod 755 /usr/local/bin/b4a -echo "Installation finished" +echo "Installation finished" \ No newline at end of file From 71123ec113a5956e9913e367edbb40ddc338128f Mon Sep 17 00:00:00 2001 From: charles-ramos Date: Wed, 30 Aug 2023 17:39:09 -0300 Subject: [PATCH 25/25] updating readme - go get installation --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 127c196..5886513 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ Alternatively, you can just type the following command. NOTE: You should already have [Go](https://golang.org/doc/install) installed and GOPATH, GOROOT set to appropriate values. ```bash - go get -t github.com/back4app/parse-cli + go get -t github.com/back4app/parse-cli@latest ``` This installs a binary called `parse-cli` at `$GOPATH/bin`.