Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
enr committed Feb 28, 2021
1 parent a349266 commit d263338
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 25 deletions.
40 changes: 25 additions & 15 deletions docs/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -26,44 +26,54 @@ Zip utilities:
- `zipts`: creates a zip file with a timestamp suffix in the name
- `zipw`: add file to existing zip
**Zipls**
List contents of a zip file.
**Zipw**
Add file to zip.
Add the file `README.md` to the zip `dist/zipp-0.7.0-dev_linux_amd64.zip` in the path `zipp-0.7.0-dev_linux_amd64/myreadme.md`:
----
$ zipw -f README.md -i 'zipp-0.7.0-dev_linux_amd64/myreadme.md' -z dist/zipp-0.7.0-dev_linux_amd64.zip
$ zipls dist/zipp-0.7.0-dev_linux_amd64.zip
zipp-0.7.0-dev_linux_amd64/
zipp-0.7.0-dev_linux_amd64/myreadme.md
zipp-0.7.0-dev_linux_amd64/zipls
zipp-0.7.0-dev_linux_amd64/zipw
zipp-0.7.0-dev_linux_amd64/zipts
----
**Zipts**
Nested write is supported.
Create a zip file with timestamp suffix:
Add the file `README.md` in the path `com/example/readme.md` into the file `WEB-INF/lib/library.jar`
into the file `webapp.war` into the file `corporate.ear`:
----
$ zipts testdata/
Zipping /home/enrico/Projects/zipp/testdata
Completed /home/enrico/Projects/zipp/testdata-20210227173843.zip
$ zipw -f README.md -i 'webapp.war#WEB-INF/lib/library.jar#com/example/readme.md' -z corporate.ear
----
**Zipw**
Add file to zip.
**Zipls**
Add the file `README.md` to the zip `dist/zipp-0.7.0-dev_linux_amd64.zip` in the path `zipp-0.7.0-dev_linux_amd64/myreadme.md`:
List contents of a zip file.
----
$ zipw -f README.md -i 'zipp-0.7.0-dev_linux_amd64/myreadme.md' -z dist/zipp-0.7.0-dev_linux_amd64.zip
$ zipls dist/zipp-0.7.0-dev_linux_amd64.zip
zipp-0.7.0-dev_linux_amd64/myreadme.md
zipp-0.7.0-dev_linux_amd64/
zipp-0.7.0-dev_linux_amd64/zipls
zipp-0.7.0-dev_linux_amd64/zipw
zipp-0.7.0-dev_linux_amd64/zipts
----
**Zipts**
Create a zip file with timestamp suffix:
----
$ zipts testdata/
Zipping /home/enrico/Projects/zipp/testdata
Completed /home/enrico/Projects/zipp/testdata-20210227173843.zip
----
## License
http://www.apache.org/licenses/LICENSE-2.0[Apache License 2.0] - Copyright (C) 2016-TODAY {project-authors}.
4 changes: 1 addition & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,16 @@ module github.com/enr/zipp
go 1.13

require (
github.com/cpuguy83/go-md2man v1.0.10 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect
github.com/enr/clui v0.0.0-20201016165326-efdcff635536
github.com/enr/go-files v0.3.0
github.com/enr/qac v0.2.0
github.com/enr/runcmd v0.5.0
github.com/enr/zipext v0.3.0
github.com/mattn/go-colorable v0.1.8
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/urfave/cli v1.22.5
golang.org/x/sys v0.0.0-20210227040730-b0d1d43c014d // indirect
golang.org/x/sys v0.0.0-20210228012217-479acdf4ea46 // indirect
golang.org/x/text v0.3.5 // indirect
gopkg.in/yaml.v2 v2.4.0
)
8 changes: 2 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk=
github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE=
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d h1:U+s90UTSYgptZMwQh2aRr3LuazLJIa+Pg3Kc1ylSYVY=
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM=
Expand Down Expand Up @@ -34,8 +32,6 @@ github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo=
github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q=
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
Expand Down Expand Up @@ -67,8 +63,8 @@ golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd h1:xhmwyvizuTgC2qz7ZlMluP20uW+C3Rm0FD/WLDX8884=
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210227040730-b0d1d43c014d h1:9fH9JvLNoSpsDWcXJ4dSE3lZW99Z3OCUZLr07g60U6o=
golang.org/x/sys v0.0.0-20210227040730-b0d1d43c014d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210228012217-479acdf4ea46 h1:V066+OYJ66oTjnhm4Yrn7SXIwSCiDQJxpBxmvqb1N1c=
golang.org/x/sys v0.0.0-20210228012217-479acdf4ea46/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
Expand Down
1 change: 1 addition & 0 deletions lib/core/timestamp.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package core

import "time"

// Timestamp return a string representation of the timestamp in format "yyyymmddhhmmss"
func Timestamp() string {
const layout = "20060102150405"
t := time.Now()
Expand Down
2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ github.com/russross/blackfriday/v2
github.com/subosito/gotenv
# github.com/urfave/cli v1.22.5
github.com/urfave/cli
# golang.org/x/sys v0.0.0-20210227040730-b0d1d43c014d
# golang.org/x/sys v0.0.0-20210228012217-479acdf4ea46
golang.org/x/sys/internal/unsafeheader
golang.org/x/sys/unix
# golang.org/x/text v0.3.5
Expand Down

0 comments on commit d263338

Please sign in to comment.