Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Troubleshoot initial release code #48
Signed-off-by: John M. Horan <johnmhoran@gmail.com>
- Loading branch information
1 parent
900cec1
commit 37b436f
Showing
10 changed files
with
183 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[bumpversion] | ||
current_version = 0.0.1.beta | ||
files = setup.py src/deltacode/__init__.py | ||
commit = False | ||
tag = False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Changelog | ||
========= | ||
|
||
0.0.1.beta (2018-02-05) | ||
------------------ | ||
This is the initial beta release. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,9 @@ | ||
graft docs | ||
graft src | ||
graft ci | ||
graft tests | ||
|
||
include .bumpversion.cfg | ||
|
||
include CHANGELOG.rst | ||
include NOTICE | ||
include deltacode.ABOUT | ||
|
||
include README.rst | ||
|
||
include tox.ini .travis.yml appveyor.yml | ||
|
||
global-exclude *.py[co] __pycache__ *.so *.pyd | ||
include .travis.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
graft src | ||
graft tests | ||
|
||
include .bumpversion.cfg | ||
|
||
include CHANGELOG.rst | ||
include deltacode.ABOUT | ||
|
||
include .travis.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
graft src | ||
graft tests | ||
|
||
include .bumpversion.cfg | ||
|
||
include CHANGELOG.rst | ||
include deltacode.ABOUT | ||
|
||
include .travis.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
#!/bin/bash | ||
# | ||
# Copyright (c) 2017 nexB Inc. http://www.nexb.com/ - All rights reserved. | ||
# | ||
|
||
# ScanCode release script | ||
# This script creates and tests release archives in the dist/ dir | ||
|
||
set -e | ||
|
||
# un-comment to trace execution | ||
set -x | ||
|
||
echo "### BUILDING ScanCode release ###" | ||
|
||
echo " RELEASE: Cleaning previous release archives, then setup and config: " | ||
rm -rf dist/ build/ | ||
|
||
# backup dev manifests | ||
cp MANIFEST.in MANIFEST.in.dev | ||
cp setup.cfg setup.cfg.dev | ||
|
||
# install release manifests | ||
cp etc/release/MANIFEST.in.release MANIFEST.in | ||
cp etc/release/setup.cfg.release setup.cfg | ||
|
||
./configure --clean | ||
export CONFIGURE_QUIET=1 | ||
# ./configure etc/conf --no-reindex-licenses | ||
|
||
echo " RELEASE: Building release archives..." | ||
|
||
# build a zip and tar.bz2 | ||
bin/python setup.py --quiet release --use-default-version | ||
# try this | ||
# bin/python setup.py --quiet release | ||
# bin/python setup.py release --use-default-version | ||
# bin/python setup.py release | ||
# 2/4/2018 10:51:38 PM Looks like 'release' forces me to register with PyPI, so try w/o | ||
# bin/python setup.py --use-default-version | ||
# bin/python setup.py | ||
|
||
echo " reached step 1..." | ||
|
||
# restore dev manifests | ||
mv MANIFEST.in.dev MANIFEST.in | ||
mv setup.cfg.dev setup.cfg | ||
|
||
|
||
function test_scan { | ||
# run a test scan for a given archive | ||
file_extension=$1 | ||
extract_command=$2 | ||
for archive in *.$file_extension; | ||
do | ||
echo " RELEASE: Testing release archive: $archive ... " | ||
$($extract_command $archive) | ||
extract_dir=$(ls -d */) | ||
cd $extract_dir | ||
|
||
# this is needed for the zip | ||
chmod o+x scancode extractcode | ||
# Try this: | ||
# chmod o+x deltacode extractcode | ||
|
||
# # minimal test: update when new scans are available | ||
# ./scancode --quiet -lcip apache-2.0.LICENSE test_scan.json | ||
# echo "TEST JSON passed: ./scancode --quiet -lcip apache-2.0.LICENSE test_scan.json" | ||
# ./scancode --quiet -lcip --format json-pp apache-2.0.LICENSE test_scan.json | ||
# echo "TEST JSON-PP passed: ./scancode --quiet -lcip --format json-pp apache-2.0.LICENSE test_scan.json" | ||
# ./scancode --quiet -lcip --format html apache-2.0.LICENSE test_scan.html | ||
# echo "TEST HTML passed: ./scancode --quiet -lcip --format html apache-2.0.LICENSE test_scan.html" | ||
# ./scancode --quiet -lcip --format html-app apache-2.0.LICENSE test_scan_app.html | ||
# echo "TEST HTML-APP passed: ./scancode --quiet -lcip --format html-app apache-2.0.LICENSE test_scan_app.html" | ||
# ./extractcode --quiet samples/arch | ||
# echo "TEST EXTRACTCODE passed: ./extractcode --quiet samples/arch" | ||
|
||
# 2/4/2018 10:51:38 PM Throws an error? Try w/o | ||
./deltacode --help | ||
echo "TEST JSON passed: ./deltacode --help" | ||
|
||
# cleanup | ||
cd .. | ||
rm -rf $extract_dir | ||
echo " RELEASE: Success" | ||
done | ||
} | ||
|
||
# 2/4/2018 10:57:49 PM Don't we need to create the dist directory? | ||
mkdir dist | ||
|
||
cd dist | ||
if [ "$1" != "--no-tests" ]; then | ||
echo " RELEASE: Testing..." | ||
test_scan bz2 "tar -xf" | ||
test_scan zip "unzip -q" | ||
else | ||
echo " RELEASE: !!!!NOT Testing..." | ||
fi | ||
|
||
|
||
echo "### RELEASE is ready for publishing ###" | ||
|
||
set +e | ||
set +x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[bdist_wheel] | ||
universal = 1 | ||
|
||
[metadata] | ||
license_file = NOTICE.txt | ||
|
||
[aliases] | ||
release = register clean --all sdist bdist_wheel upload | ||
|
||
[flake8] | ||
max-line-length = 140 | ||
exclude = tests/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[bdist_wheel] | ||
universal = 1 | ||
|
||
[metadata] | ||
license_file = NOTICE.txt | ||
|
||
[aliases] | ||
release = register clean --all sdist bdist_wheel upload | ||
|
||
[flake8] | ||
max-line-length = 140 | ||
exclude = tests/* |