Skip to content
This repository has been archived by the owner on Aug 18, 2020. It is now read-only.

Commit

Permalink
Merge in release prep changes
Browse files Browse the repository at this point in the history
  • Loading branch information
bbridges committed Jul 15, 2018
2 parents 0bfbf97 + c1b8e87 commit 1f8a97d
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,6 @@ ENV/

# target-finder model files
/target_finder/data/

# Output from the prepare-release.sh script
/release/
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Changelog

# v0.1.0

Initial release.
51 changes: 51 additions & 0 deletions scripts/create-release.sh
Original file line number Diff line number Diff line change
@@ -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
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()],
Expand Down

0 comments on commit 1f8a97d

Please sign in to comment.