Skip to content

Commit

Permalink
[MINOR] Release script updates
Browse files Browse the repository at this point in the history
Some minor adjustments to adapt to changes since 0.1 (e.g., running in containers, avoiding deps building, etc)
  • Loading branch information
corepointer committed Jun 5, 2023
1 parent df7eb40 commit d6269b9
Showing 1 changed file with 24 additions and 20 deletions.
44 changes: 24 additions & 20 deletions pack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,37 +98,41 @@ fi
rm -rf bin build lib

# shellcheck disable=SC2086
source build.sh $FEATURE --target all

# shellcheck disable=SC2154
if [ -d "$daphneBuildDir"/venv ]; then
source "$daphneBuildDir"/venv/bin/activate
else
if ! command -v virtualenv &> /dev/null
then
echo "you should install virtualenv to create a python environment for testing"
echo "e.g., apt install virtualenv";
exit
else
virtualenv "$daphneBuildDir"/venv
source "$daphneBuildDir"/venv/bin/activate
pip install numpy
fi
fi
source build.sh -nd -ns -nf --installPrefix /usr/local $FEATURE --target all


# this might be obsolete when running from daphne-dev docker container:
## shellcheck disable=SC2154
#if [ -d "$daphneBuildDir"/venv ]; then
# source "$daphneBuildDir"/venv/bin/activate
#else
# if ! command -v virtualenv &> /dev/null
# then
# echo "you should install virtualenv to create a python environment for testing"
# echo "e.g., apt install virtualenv";
# exit
# else
# virtualenv "$daphneBuildDir"/venv
# source "$daphneBuildDir"/venv/bin/activate
# pip install numpy
# fi
#fi

# shellcheck disable=SC2154
cd "$projectRoot"

# shellcheck disable=SC2086
source test.sh $FEATURE
source test.sh --no-build $FEATURE

# shellcheck disable=SC2181
if [[ $? == 0 ]];then
cd "$daphneBuildDir"
mkdir -p "$PACK_ROOT/bin"
# shellcheck disable=SC2154
cp -a "$projectRoot"/{deploy,doc,lib,scripts} "$PACK_ROOT"
cp -a "$projectRoot"/bin/{daphne,DistributedWorker} "$PACK_ROOT/bin"
cp -a "$projectRoot"/{bin,deploy,doc,lib,scripts} "$PACK_ROOT"
# this assumes that the pack script is run from an environment that has third party deps in /usr/local
# e.g. the daphne-dev docker container
cp -a /usr/local/lib/{libantlr4-runtime.so*,libparquet.so*,libpapi.so*,libarrow.so*} "$PACK_ROOT/lib"
cp "$projectRoot"/{CITATION,CONTRIBUTING.md,KEYS.txt,LICENSE.txt,README.md,UserConfig.json} "$PACK_ROOT"
tar czf "$PACK_ROOT".tgz "$PACK_ROOT"
cd - > /dev/null
Expand Down

0 comments on commit d6269b9

Please sign in to comment.