Skip to content

Commit

Permalink
Better versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
burbilog committed Mar 12, 2018
1 parent 2d0c40b commit 69cbe72
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 9 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Changed
- Simplified running tests

## [1.0.1] - 2018-03-12
### Added
- Deduplication mechanism with `--nodedup` flag.
- CHANGELOG.md file
- Better versioning
### Changed
- Simplified running tests

### Changed
- Added test for deduplication
Expand Down
11 changes: 9 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,14 @@ clean:
w:
git commit -a -m "working..."

win32:
win32: build32 zip32

build32:
wine pyinstaller --onefile scrapbook2zotero.py
cd dist && zip scrapbook2zotero.zip scrapbook2zotero.exe

zip32:
VERSION=`./get-version.sh`
cd dist && zip scrapbook2zotero-v$(VERSION).zip scrapbook2zotero.exe


# Run this if you are sure that scrapbook2zotero output is correct
Expand All @@ -47,3 +52,5 @@ build_samples:
./scrapbook2zotero.py scrapbook_test_data samples/standard-no-tags.rdf --notags
./scrapbook2zotero.py scrapbook_test_data samples/standard-no-dedup.rdf --nodedup

current-version:
@echo Current version is `./get-version.sh`
3 changes: 3 additions & 0 deletions get-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

grep '^VERSION = "[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\+"$' scrapbook2zotero.py | grep -o '[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\+'
10 changes: 5 additions & 5 deletions test_s2z.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@ def test_1_reading_scrapbook_rdf():
def test_2_standard_run():
""" Testing default output """
run_main_and_compare(["scrapbook_test_data", "tmp/test.rdf"],
"samples/standard.rdf", "tmp/test.rdf")
"samples/standard.rdf", "tmp/test.rdf")


def test_3_exclude():
""" Testing --exclude feature, excluding items #1 and #4 """
run_main_and_compare(["scrapbook_test_data", "tmp/test-exclude.rdf", "--exclude", "1", "4"],
"samples/standard_1_4_excluded.rdf", "tmp/test-exclude.rdf")
"samples/standard_1_4_excluded.rdf", "tmp/test-exclude.rdf")

def test_4_win32():
""" Test win32 build
Expand All @@ -90,14 +90,14 @@ def test_4_win32():
def test_5_nocoll():
""" Testing disabling of collection exports (--nocoll flag) """
run_main_and_compare(["scrapbook_test_data", "tmp/test-nocoll.rdf", "--nocoll"],
"samples/standard-no-collections.rdf", "tmp/test-nocoll.rdf")
"samples/standard-no-collections.rdf", "tmp/test-nocoll.rdf")

def test_6_notags():
""" Testing disabling of collection exports (--notags flag) """
run_main_and_compare(["scrapbook_test_data", "tmp/test-notags.rdf", "--notags"],
"samples/standard-no-tags.rdf", "tmp/test-notags.rdf")
"samples/standard-no-tags.rdf", "tmp/test-notags.rdf")

def test_7_nodedup():
""" Testing disabling of deduplication (--nodedup flag) """
run_main_and_compare(["scrapbook_test_data", "tmp/test-nodedup.rdf", "--nodedup"],
"samples/standard-no-dedup.rdf", "tmp/test-nodedup.rdf")
"samples/standard-no-dedup.rdf", "tmp/test-nodedup.rdf")

0 comments on commit 69cbe72

Please sign in to comment.