Skip to content

Commit

Permalink
Revert "Fixed missing packagedcode not included in release for #142 *…
Browse files Browse the repository at this point in the history
… also fixed #129 including the samples in the release builds.  * improved the release scripts and CI to include test of built    archive  * added release script run to the Ci test suite  * added packagedcode to CI test suites (it was missing)  "

This reverts commit 8c730e0.
  • Loading branch information
pombredanne committed Dec 7, 2015
1 parent e909173 commit c2badc7
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 110 deletions.
15 changes: 7 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,16 @@ os:
- linux

env:
- TEST_SUITE: bin/py.test -n 2 -vvs src tests/commoncode tests/extractcode tests/textcode tests/typecode tests/scancode tests/packagedcode
- TEST_SUITE: bin/py.test -n 2 -vvs tests/cluecode
- TEST_SUITE: bin/py.test -n 2 -vvs tests/licensedcode/test_detect.py tests/licensedcode/test_index.py tests/licensedcode/test_legal.py tests/licensedcode/test_models.py
- TEST_SUITE: bin/py.test -n 2 -vvs tests/licensedcode/test_detection_datadriven.py
- TEST_SUITE: bin/py.test -n 2 -vvs tests/licensedcode/test_detection_validate.py
- TEST_SUITE: ./etc/release/release.sh
- TEST_SUITE: src tests/commoncode tests/extractcode tests/textcode tests/typecode tests/scancode
- TEST_SUITE: tests/cluecode
- TEST_SUITE: tests/licensedcode/test_detect.py tests/licensedcode/test_index.py tests/licensedcode/test_legal.py tests/licensedcode/test_models.py
- TEST_SUITE: tests/licensedcode/test_detection_datadriven.py
- TEST_SUITE: tests/licensedcode/test_detection_validate.py


install:
- ./configure
- source configure

script:
- $TEST_SUITE
- py.test -n 2 -vvs $TEST_SUITE

23 changes: 2 additions & 21 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,34 +1,15 @@
graft src
graft etc
graft thirdparty
graft samples

graft tests


prune src/scancode_toolkit.egg-info

include AUTHORS.rst
include CHANGELOG.rst
include README.rst
include CONTRIBUTING.rst
include apache-2.0.LICENSE
include cc0-1.0.LICENSE
include NOTICE
include MANIFEST.in
include setup.py
include setup.cfg
include .gitignore
include configure
include configure.bat
include CONTRIBUTING.rst
include MANIFEST.in
include NOTICE
include scancode
include scancode.bat
include extractcode
include extractcode.bat
include scancode.ABOUT

include .travis.yml appveyor.yml
include tox.ini .travis.yml appveyor.yml

global-exclude *.py[co] __pycache__
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ install:
build: off

test_script:
- py.test -n 2 -vvs src tests/commoncode tests/extractcode tests/textcode tests/typecode tests/cluecode tests/packagedcode tests/scancode tests/licensedcode/test_detect.py tests/licensedcode/test_index.py tests/licensedcode/test_legal.py tests/licensedcode/test_models.py
- py.test -n 2 -vvs src tests/commoncode tests/extractcode tests/textcode tests/typecode tests/cluecode tests/scancode tests/licensedcode/test_detect.py tests/licensedcode/test_index.py tests/licensedcode/test_legal.py tests/licensedcode/test_models.py
23 changes: 2 additions & 21 deletions etc/release/MANIFEST.in.dev
Original file line number Diff line number Diff line change
@@ -1,34 +1,15 @@
graft src
graft etc
graft thirdparty
graft samples

graft tests


prune src/scancode_toolkit.egg-info

include AUTHORS.rst
include CHANGELOG.rst
include README.rst
include CONTRIBUTING.rst
include apache-2.0.LICENSE
include cc0-1.0.LICENSE
include NOTICE
include MANIFEST.in
include setup.py
include setup.cfg
include .gitignore
include configure
include configure.bat
include CONTRIBUTING.rst
include MANIFEST.in
include NOTICE
include scancode
include scancode.bat
include extractcode
include extractcode.bat
include scancode.ABOUT

include .travis.yml appveyor.yml
include tox.ini .travis.yml appveyor.yml

global-exclude *.py[co] __pycache__
14 changes: 9 additions & 5 deletions etc/release/MANIFEST.in.release
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
graft src
graft etc
graft thirdparty
graft samples

recursive-exclude thirdparty/dev *
#recursive-exclude tests *
prune tests
recursive-exclude thirdparty/dev *.whl *.LICENSE *.ABOUT

prune src/packagedcode
prune src/sourcecode
prune src/samecode
prune src/scancode_toolkit.egg-info
prune src/compiledcode

include AUTHORS.rst
include CHANGELOG.rst
Expand All @@ -13,6 +18,7 @@ include CONTRIBUTING.rst
include apache-2.0.LICENSE
include cc0-1.0.LICENSE
include NOTICE
include scancode.ABOUT
include MANIFEST.in
include setup.py
include setup.cfg
Expand All @@ -24,8 +30,6 @@ include MANIFEST.in
include NOTICE
include scancode
include scancode.bat
include extractcode
include extractcode.bat

include .travis.yml appveyor.yml

Expand Down
60 changes: 6 additions & 54 deletions etc/release/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,69 +3,21 @@
# Copyright (c) 2015 nexB Inc. http://www.nexb.com/ - All rights reserved.
#

# ScanCode release script
# This script creates and tests release archives in the dist/ dir
# A minimal release script

set -e
#RELEASE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
#cd "$RELEASE_DIR"

# un-comment to trace execution
# set -x

echo "### BUILDING ScanCode release ###"

echo -n " RELEASE: Cleaning previous release archives, then setup and config: "
rm -rf dist/

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

echo " RELEASE: Building release archives..."

# build a zip and tar.bz2
bin/python setup.py --quiet sdist --formats=bztar,zip

./configure --clean
source configure etc/conf
python setup.py sdist --formats=bztar,zip

# Restoring initial dev setup and config...
cp etc/release/MANIFEST.in.dev MANIFEST.in
cp etc/release/setup.cfg.dev setup.cfg


function test_scan {
file_extension=$1
extract_command=$2
for archive in *.$file_extension;
do
echo -n " 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

# minimal test: update when new scans are available
./scancode --quiet -lcip apache-2.0.LICENSE test_scan.json
./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
./extractcode --quiet samples/arch

# cleanup
cd ..
rm -rf $extract_dir
echo " RELEASE: Success"
done
}

cd dist
echo " RELEASE: Testing..."
test_scan bz2 "tar -xf"
test_scan zip "unzip -q"

echo "### RELEASE is ready for publishing ###"

set +e
set +x

11 changes: 11 additions & 0 deletions etc/release/setup.cfg.dev
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,14 @@ addopts =
--ignore docs/conf.py
--ignore setup.py
--doctest-modules

# addopts =
# -rfEsxX
# --strict
# -s
# -vv
# --ignore docs/conf.py
# --ignore setup.py
# --doctest-modules
# --doctest-glob \*.rst
#
12 changes: 12 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ norecursedirs =
include
Lib
lib
.Python
Scripts
thirdparty
tmp
Expand All @@ -40,3 +41,14 @@ addopts =
--ignore docs/conf.py
--ignore setup.py
--doctest-modules

# addopts =
# -rfEsxX
# --strict
# -s
# -vv
# --ignore docs/conf.py
# --ignore setup.py
# --doctest-modules
# --doctest-glob \*.rst
#

0 comments on commit c2badc7

Please sign in to comment.