Skip to content

Commit

Permalink
Merge pull request #5 from usdAG/develop
Browse files Browse the repository at this point in the history
Prepare v1.0.1 Release
  • Loading branch information
qtc-de committed Aug 29, 2022
2 parents 5ab05c0 + cc168a1 commit 90ffe91
Show file tree
Hide file tree
Showing 8 changed files with 166 additions and 5 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).


## v1.0.1 - Aug 29, 2022

### Changed

* Fix `NoneType` error when using `--archive-type`


## v1.0.0 - Aug 25, 2022

### Initial Release
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ utility with an extended feature set and improved base functionality.

![](https://github.com/usdAG/slipit/workflows/main%20Python%20CI/badge.svg?branch=main)
![](https://github.com/usdAG/slipit/workflows/develop%20Python%20CI/badge.svg?branch=develop)
[![](https://img.shields.io/badge/version-1.0.0-blue)](https://github.com/usdAG/slipit/releases)
[![](https://img.shields.io/badge/version-1.0.1-blue)](https://github.com/usdAG/slipit/releases)
[![](https://img.shields.io/badge/build%20system-pip-blue)](https://pypi.org/project/slipit)
![](https://img.shields.io/badge/python-9%2b-blue)
[![](https://img.shields.io/badge/license-GPL%20v3.0-blue)](https://github.com/usdAG/slipit/blob/main/LICENSE)
Expand Down Expand Up @@ -69,7 +69,7 @@ usage: slipit [-h] [--archive-type {zip,tar,tgz,bz2}] [--clear] [--debug] [--dep
[--overwrite] [--prefix string] [--multi] [--remove name] [--separator char] [--sequence seq]
[--static content] [--symlink target] archive [filename ...]

slipit v1.0.0 - Utility for creating ZipSlip archives.
slipit v1.0.1 - Utility for creating ZipSlip archives.

positional arguments:
archive target archive file
Expand Down
4 changes: 2 additions & 2 deletions bin/slipit
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def get_provider(output_file: str) -> str:
sys.exit(1)


parser = argparse.ArgumentParser(description='''slipit v1.0.0 - Utility for creating ZipSlip archives.''')
parser = argparse.ArgumentParser(description='''slipit v1.0.1 - Utility for creating ZipSlip archives.''')

parser.add_argument('archive', help='target archive file')
parser.add_argument('filename', nargs='*', help='filenames to include into the archive')
Expand All @@ -155,7 +155,7 @@ def main():
archive = None
error_code = 0
args = parser.parse_args()
provider = ArchiveProvider.get_provider_ext(args.type) if args.type else get_provider(args.archive)
provider = ArchiveProvider.get_provider_ext('.' + args.type) if args.type else get_provider(args.archive)

try:
if args.clear:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name='slipit',
version='1.0.0',
version='1.0.1',
url='https://github.com/usdAG/slipit',
author='Tobias Neitzel (@qtc_de)',
description='slipit - Utility for creating archives with path traversal elements',
Expand Down
38 changes: 38 additions & 0 deletions tests/testcases/tar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ tester:
variables:
tmpfile: '/tmp/slipit-temporary-file'
archive: '/tmp/slipit-temporary-archive.tar'
archive2: '/tmp/slipit-temporary-archive.zip'


plugins:
Expand All @@ -22,6 +23,7 @@ plugins:
- cleanup:
items:
- ${archive}
- ${archive2}


tests:
Expand Down Expand Up @@ -308,3 +310,39 @@ tests:
- '..\..\..\..\slipit-temporary-file'
- '../../../../../slipit-temporary-file'
- '..\..\..\..\..\slipit-temporary-file'

- title: Create an archive with explicit type
description: |-
Create an archive using --archive-type
command:
- slipit
- ${archive2}
- ${tmpfile}
- --archive-type
- tar

validators:
- error: False
- tar_contains:
archive: ${archive2}
files:
- filename: '..\..\..\..\..\..\slipit-temporary-file'
size: 12
type: REGTYPE

- title: List an archive with explicit type
description: |-
List an archive using --archive-type
command:
- slipit
- ${archive2}
- --archive-type
- tar

validators:
- error: False
- contains:
values:
- '..\..\..\..\..\..\slipit-temporary-file'
39 changes: 39 additions & 0 deletions tests/testcases/tarbz2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ tester:
variables:
tmpfile: '/tmp/slipit-temporary-file'
archive: '/tmp/slipit-temporary-archive.tar'
archive2: '/tmp/slipit-temporary-archive.zip'


plugins:
Expand All @@ -22,6 +23,7 @@ plugins:
- cleanup:
items:
- ${archive}
- ${archive2}


tests:
Expand Down Expand Up @@ -308,3 +310,40 @@ tests:
- '..\..\..\..\slipit-temporary-file'
- '../../../../../slipit-temporary-file'
- '..\..\..\..\..\slipit-temporary-file'

- title: Create an archive with explicit type
description: |-
Create an archive using --archive-type
command:
- slipit
- ${archive2}
- ${tmpfile}
- --archive-type
- bz2

validators:
- error: False
- tar_contains:
archive: ${archive2}
compression: bz2
files:
- filename: '..\..\..\..\..\..\slipit-temporary-file'
size: 12
type: REGTYPE

- title: List an archive with explicit type
description: |-
List an archive using --archive-type
command:
- slipit
- ${archive2}
- --archive-type
- bz2

validators:
- error: False
- contains:
values:
- '..\..\..\..\..\..\slipit-temporary-file'
39 changes: 39 additions & 0 deletions tests/testcases/targz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ tester:
variables:
tmpfile: '/tmp/slipit-temporary-file'
archive: '/tmp/slipit-temporary-archive.tar'
archive2: '/tmp/slipit-temporary-archive.zip'


plugins:
Expand All @@ -22,6 +23,7 @@ plugins:
- cleanup:
items:
- ${archive}
- ${archive2}


tests:
Expand Down Expand Up @@ -308,3 +310,40 @@ tests:
- '..\..\..\..\slipit-temporary-file'
- '../../../../../slipit-temporary-file'
- '..\..\..\..\..\slipit-temporary-file'

- title: Create an archive with explicit type
description: |-
Create an archive using --archive-type
command:
- slipit
- ${archive2}
- ${tmpfile}
- --archive-type
- tgz

validators:
- error: False
- tar_contains:
archive: ${archive2}
compression: gz
files:
- filename: '..\..\..\..\..\..\slipit-temporary-file'
size: 12
type: REGTYPE

- title: List an archive with explicit type
description: |-
List an archive using --archive-type
command:
- slipit
- ${archive2}
- --archive-type
- tgz

validators:
- error: False
- contains:
values:
- '..\..\..\..\..\..\slipit-temporary-file'
38 changes: 38 additions & 0 deletions tests/testcases/zip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ tester:
variables:
tmpfile: '/tmp/slipit-temporary-file'
archive: '/tmp/slipit-temporary-archive.zip'
archive2: '/tmp/slipit-temporary-archive.tar'


plugins:
Expand All @@ -22,6 +23,7 @@ plugins:
- cleanup:
items:
- ${archive}
- ${archive2}


tests:
Expand Down Expand Up @@ -302,3 +304,39 @@ tests:
- '..\..\..\..\slipit-temporary-file'
- '../../../../../slipit-temporary-file'
- '..\..\..\..\..\slipit-temporary-file'

- title: Create an archive with explicit type
description: |-
Create a new archive using --archive-type
command:
- slipit
- ${archive2}
- ${tmpfile}
- --archive-type
- zip

validators:
- error: False
- zip_contains:
archive: ${archive2}
files:
- filename: '..\..\..\..\..\..\slipit-temporary-file'
size: 12
type: FILE

- title: List archive with explicit type
description: |-
List an archive using --archive-type
command:
- slipit
- ${archive2}
- --archive-type
- zip

validators:
- error: False
- contains:
values:
- '..\..\..\..\..\..\slipit-temporary-file'

0 comments on commit 90ffe91

Please sign in to comment.