Skip to content

Commit

Permalink
Troubleshoot initial release code #48
Browse files Browse the repository at this point in the history
Signed-off-by: John M. Horan <johnmhoran@gmail.com>
  • Loading branch information
johnmhoran committed Feb 5, 2018
1 parent 900cec1 commit 37b436f
Show file tree
Hide file tree
Showing 10 changed files with 183 additions and 98 deletions.
5 changes: 5 additions & 0 deletions .bumpversion.cfg
@@ -0,0 +1,5 @@
[bumpversion]
current_version = 0.0.1.beta
files = setup.py src/deltacode/__init__.py
commit = False
tag = False
6 changes: 6 additions & 0 deletions CHANGELOG.rst
@@ -0,0 +1,6 @@
Changelog
=========

0.0.1.beta (2018-02-05)
------------------
This is the initial beta release.
9 changes: 1 addition & 8 deletions MANIFEST.in
@@ -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
9 changes: 9 additions & 0 deletions MANIFEST.in.dev
@@ -0,0 +1,9 @@
graft src
graft tests

include .bumpversion.cfg

include CHANGELOG.rst
include deltacode.ABOUT

include .travis.yml
32 changes: 23 additions & 9 deletions NOTICE.txt
Expand Up @@ -2,10 +2,10 @@ Software license
================

Copyright (c) 2017 nexB Inc. and others. All rights reserved.
http://nexb.com and https://github.com/nexb/deltacode/
The Conan software is licensed under the Apache License version 2.0.
Data generated with Conan require an acknowledgment.
Conan is a trademark of nexB Inc.
http://nexb.com and https://github.com/nexB/deltacode/
The DeltaCode software is licensed under the Apache License version 2.0.
Data generated with DeltaCode require an acknowledgment.
DeltaCode is a trademark of nexB Inc.

You may not use this software except in compliance with the License.
You may obtain a copy of the License at: http://apache.org/licenses/LICENSE-2.0
Expand All @@ -14,21 +14,35 @@ under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.

When you publish or redistribute any data created with DeltaCode or any DeltaCode
derivative work, you must accompany this data with the following acknowledgment:

Generated with DeltaCode and provided on an "AS IS" BASIS, WITHOUT WARRANTIES
OR CONDITIONS OF ANY KIND, either express or implied. No content created from
DeltaCode should be considered or used as legal advice. Consult an Attorney
for any legal advice.
DeltaCode is a free software codebase-comparison tool from nexB Inc. and others.
Visit https://github.com/nexB/deltacode/ for support and download.


Third-party software licenses
=============================

Conan embeds third-party free and open source software packages under various
DeltaCode embeds third-party free and open source software packages under various
licenses including copyleft licenses. Some of the third-party software packages
are delivered as pre-built binaries. The origin and license of these packages is
documented by .ABOUT files.

The corresponding source code for pre-compiled third-party software is available
as part of this download.
for immediate download from the same release page where you obtained DeltaCode at:
https://github.com/nexB/deltacode/
or https://github.com/nexB/deltacode-thirdparty-src/

You may also contact us to request the source code by email at info@nexb.com or
by postal mail at:
nexB Inc., Conan open source code request

nexB Inc., DeltaCode open source code request
735 Industrial Road, Suite #101, 94070 San Carlos, CA, USA
Please indicate in your communication the Conan version for which you are
requesting source code.

Please indicate in your communication the DeltaCode version for which you are
requesting source code.
9 changes: 9 additions & 0 deletions etc/release/MANIFEST.in.release
@@ -0,0 +1,9 @@
graft src
graft tests

include .bumpversion.cfg

include CHANGELOG.rst
include deltacode.ABOUT

include .travis.yml
105 changes: 105 additions & 0 deletions etc/release/release.sh
@@ -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
12 changes: 12 additions & 0 deletions etc/release/setup.cfg.release
@@ -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/*
82 changes: 1 addition & 81 deletions setup.cfg
Expand Up @@ -9,84 +9,4 @@ release = register clean --all sdist bdist_wheel upload

[flake8]
max-line-length = 140
exclude = tests/*

[tool:pytest]
norecursedirs =
.git
.tox
dist
build
thirdparty
local
ci
docs
etc
Include
include
Lib
lib
bin
Scripts
tmp
.cache
data
src/data
tests/data

python_files = *.py

python_classes=Test
python_functions=test

addopts =
-rfEsxX
--strict
-s
-vv
--ignore docs/conf.py
--ignore setup.py
--doctest-modules

[isort]
force_single_line=True
line_length=120
known_first_party=licensedcode
default_section=THIRDPARTY
forced_separate=test_licensedcode

[matrix]
# This is the configuration for the `./bootstrap.py` script.
# It generates `.travis.yml`, `tox.ini` and `appveyor.yml`.
#
# Syntax: [alias:] value [!variable[glob]] [&variable[glob]]
#
# alias:
# - is used to generate the tox environment
# - it's optional
# - if not present the alias will be computed from the `value`
# value:
# - a value of "-" means empty
# !variable[glob]:
# - exclude the combination of the current `value` with
# any value matching the `glob` in `variable`
# - can use as many you want
# &variable[glob]:
# - only include the combination of the current `value`
# when there's a value matching `glob` in `variable`
# - can use as many you want

python_versions =
2.7
3.4
pypy

dependencies =
-

coverage_flags =
: true
nocover: false

environment_variables =
-
exclude = tests/*
12 changes: 12 additions & 0 deletions setup.cfg.dev
@@ -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/*

0 comments on commit 37b436f

Please sign in to comment.