Skip to content

Commit d2f720e

Browse files
committed
Updated to v1.7.1
1 parent ade40ad commit d2f720e

File tree

4 files changed

+28
-13
lines changed

4 files changed

+28
-13
lines changed

ggsrun.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ func main() {
1515
app.Author = "Tanaike [ https://github.com/tanaikech/ggsrun ] "
1616
app.Email = "[email protected]"
1717
app.Usage = "This is a CLI application for managing Google Drive and Google Apps Script (GAS)."
18-
app.Version = "1.7.0"
18+
app.Version = "1.7.1"
1919
app.Commands = []cli.Command{
2020
{
2121
Name: "exe1",

help/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1530,7 +1530,6 @@ On the other hand, what Service Account can do with ggsrun is as follows.
15301530
Basically, when you use Service Account, please add an option of ``-sa credentials.json``. ``-sa`` and ``credentials.json`` are the option for using Service Account and JSON file including credentials retrieved by creating Service Account, respectively.
15311531

15321532
#### 1. Get file list of Google Drive
1533-
15341533
~~~bash
15351534
$ ggsrun ls -sa credentials.json -s
15361535
~~~
@@ -1541,7 +1540,7 @@ or
15411540
$ ggsrun d -sa credentials.json -i root -l
15421541
~~~
15431542

1544-
By this, the metadata of all files in Google Drive of Service Account can be retrieved.
1543+
**By this, the metadata of all files and folders in Google Drive of Service Account can be retrieved.**
15451544

15461545

15471546
#### 2. Download files

help/UpdateHistory.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,12 @@ ggsrun
152152
1. [**ggsrun got to be able to be used by not only OAuth2, but also Service Account. By this, using ggsrun, Google Drive for Service Account got to be able to be managed.**](https://github.com/tanaikech/ggsrun/blob/master/help/README.md#useserviceaccount)
153153
1. Some modifications.
154154

155+
<a name="v171"></a>
156+
157+
* v1.7.1 (December 30, 2018)
158+
1. A bug was removed.
159+
- When a project is downloaded and zipped, there was a case that "createdTime" and "modifiedTime" of the project cannot be retrieved by Apps Script API. This was modified.
160+
155161
**You can read "How to install" at [here](https://github.com/tanaikech/ggsrun/blob/master/README.md#howtoinstall).**
156162

157163

utl/zip.go

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,19 +51,29 @@ func (f *zipFileHeads) doFilesZip(comment string) *bytes.Buffer {
5151
// zipComment : Add information of project to zip file as a comment.
5252
func (p *FileInf) zipComment() string {
5353
commentStruct := struct {
54-
Name string `json:"projectName"`
55-
ID string `json:"fileId"`
56-
CreatedTime string `json:"cretedTime"`
57-
ModifiedTime string `json:"modifiedTime"`
58-
OwnerName string `json:"ownerName"`
59-
OwnerEmail string `json:"ownerEmail"`
60-
LastModifyingUserName string `json:"lastModifyingUserName"`
61-
LastModifyingUserEmail string `json:"lastModifyingUserEmail"`
54+
Name string `json:"projectName,omitempty"`
55+
ID string `json:"fileId,omitempty"`
56+
CreatedTime string `json:"cretedTime,omitempty"`
57+
ModifiedTime string `json:"modifiedTime,omitempty"`
58+
OwnerName string `json:"ownerName,omitempty"`
59+
OwnerEmail string `json:"ownerEmail,omitempty"`
60+
LastModifyingUserName string `json:"lastModifyingUserName,omitempty"`
61+
LastModifyingUserEmail string `json:"lastModifyingUserEmail,omitempty"`
6262
}{
6363
p.FileName,
6464
p.FileID,
65-
p.CreatedTime.In(time.Local).Format("20060102 15:04:05 MST"),
66-
p.ModifiedTime.In(time.Local).Format("20060102 15:04:05 MST"),
65+
func() string {
66+
if p.CreatedTime != nil {
67+
return p.CreatedTime.In(time.Local).Format("20060102 15:04:05 MST")
68+
}
69+
return ""
70+
}(),
71+
func() string {
72+
if p.CreatedTime != nil {
73+
return p.ModifiedTime.In(time.Local).Format("20060102 15:04:05 MST")
74+
}
75+
return ""
76+
}(),
6777
p.Owners[0].Name,
6878
p.Owners[0].Email,
6979
p.LastModifyingUser.Name,

0 commit comments

Comments
 (0)