From f38b3f9eb95fe2f2916612e529f1470489783c35 Mon Sep 17 00:00:00 2001 From: Bradley Bridges Date: Sat, 14 Jul 2018 19:52:06 -0500 Subject: [PATCH 1/3] Update setup.py for initial release --- setup.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index e58fb30..0070d27 100644 --- a/setup.py +++ b/setup.py @@ -48,14 +48,14 @@ def load_requirements(): setup( - name='uavaustin-target-finder', + name='target-finder', version=get_version(), - author='Unmanned Aerial Vehicle Team | UT Austin', + author='UAV Austin', url='https://github.com/uavaustin/target-finder', packages=find_packages(), package_data={ 'target_finder': [ - 'data/retrained_graph.pb', 'data/retrained_labels.txt' + 'data/graph.pb', 'data/labels.txt' ] }, install_requires=[load_requirements()], From 02775de9140c7d8ca747e17e30ad159cca6c7d72 Mon Sep 17 00:00:00 2001 From: Bradley Bridges Date: Sun, 15 Jul 2018 09:09:26 -0500 Subject: [PATCH 2/3] Add release script --- .gitignore | 3 +++ scripts/create-release.sh | 51 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100755 scripts/create-release.sh diff --git a/.gitignore b/.gitignore index fceb3f7..55d3e09 100644 --- a/.gitignore +++ b/.gitignore @@ -112,3 +112,6 @@ ENV/ # target-finder model files /target_finder/data/ + +# Output from the prepare-release.sh script +/release/ diff --git a/scripts/create-release.sh b/scripts/create-release.sh new file mode 100755 index 0000000..08988a3 --- /dev/null +++ b/scripts/create-release.sh @@ -0,0 +1,51 @@ +#!/bin/sh -e + +cd $(dirname "$0") + +graph_file="../target_finder/data/graph.pb" +labels_file="../target_finder/data/labels.txt" + +# Check that the model files exist. +[ -f "$graph_file" ] || (>&2 echo "Missing graph.pb" && exit 1) +[ -f "$labels_file" ] || (>&2 echo "Missing labels.txt" && exit 1) + +# Find the version number to release. +version=$(grep -o -e "'.*'" "../target_finder/version.py" | tr -d "'") + +echo "Detected version ""$version" + +tf_stage_dir="../release/staging/target-finder""$version" +archive_name="target-finder-""$version"".tar.gz" + +# Create the staging directory and the target-finder folder. +echo "Staging files" +mkdir -p "$tf_stage_dir" + +# Copy over python files. +mkdir -p "$tf_stage_dir""/target_finder" +find "../target_finder/" -name "*.py" -exec cp '{}' \ + "$tf_stage_dir/target_finder/" \; + +# Copy over the graph and labels. +mkdir -p "$tf_stage_dir""/target_finder/data" +cp "$graph_file" "$tf_stage_dir""/target_finder/data/" +cp "$labels_file" "$tf_stage_dir""/target_finder/data/" + +# Copy over configuration and informational files. +cp ../README.md ../LICENSE ../CHANGELOG.md ../MANIFEST.in ../requirements.txt \ + ../setup.py "$tf_stage_dir" + +# Compress the directory. +echo "Creating archive" + +cd "../release/staging" +tar -czvf "$archive_name" "target-finder" +mv "$archive_name" .. + +echo "\033[32mCreated target-finder release" \ + "(""$archive_name"")\033[0m" + +# Remove the staging directory. +echo "Removing staging files" +cd .. +rm -rf staging From c1b8e87a51bfb0e781d73a7c896a5469b2716b81 Mon Sep 17 00:00:00 2001 From: Bradley Bridges Date: Sun, 15 Jul 2018 09:09:47 -0500 Subject: [PATCH 3/3] Add changelog for initial release --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..afd46f4 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,5 @@ +# Changelog + +# v0.1.0 + +Initial release.