Files
dragonpilot/release/build_release2.sh

68 lines
1.6 KiB
Bash
Raw Normal View History

2020-02-10 14:38:47 -08:00
#!/usr/bin/env bash
set -e
2020-02-10 14:38:47 -08:00
export GIT_COMMITTER_NAME="Vehicle Researcher"
export GIT_COMMITTER_EMAIL="user@comma.ai"
export GIT_AUTHOR_NAME="Vehicle Researcher"
export GIT_AUTHOR_EMAIL="user@comma.ai"
export GIT_SSH_COMMAND="ssh -i /data/gitkey"
# Create folders
2020-02-10 14:46:01 -08:00
rm -rf /data/openpilot
mkdir -p /data/openpilot
cd /data/openpilot
2020-02-10 14:38:47 -08:00
# Create git repo
git init
2020-02-11 21:25:21 +00:00
git remote add origin git@github.com:commaai/openpilot.git
git fetch origin devel
git fetch origin release2-staging
git fetch origin dashcam-staging
2020-02-10 14:38:47 -08:00
# Checkout devel
2020-02-11 21:25:21 +00:00
#git checkout origin/devel
#git clean -xdf
2020-02-10 14:38:47 -08:00
# Create release2 with no history
2020-02-11 21:25:21 +00:00
git checkout --orphan release2-staging origin/devel
2020-02-10 14:38:47 -08:00
VERSION=$(cat selfdrive/common/version.h | awk -F\" '{print $2}')
git commit -m "openpilot v$VERSION"
# Build signed panda firmware
pushd panda/board/
2020-02-10 14:46:01 -08:00
cp -r /tmp/pandaextra /data/openpilot/
2020-02-10 14:38:47 -08:00
RELEASE=1 make obj/panda.bin
mv obj/panda.bin /tmp/panda.bin
make clean
mv /tmp/panda.bin obj/panda.bin.signed
rm -rf /data/openpilot/pandaextra
popd
# Build stuff
ln -sf /data/openpilot /data/pythonpath
2020-02-10 14:38:47 -08:00
export PYTHONPATH="/data/openpilot:/data/openpilot/pyextra"
SCONS_CACHE=1 scons -j3
nosetests -s selfdrive/test/test_openpilot.py
# Cleanup
find . -name '*.pyc' -delete
rm .sconsign.dblite
# Mark as prebuilt release
touch prebuilt
# Add built files to git
git add -f .
git commit --amend -m "openpilot v$VERSION"
# Push to release2-staging
2020-02-11 21:25:21 +00:00
git push -f origin release2-staging
2020-02-10 14:38:47 -08:00
# Create dashcam release
git rm selfdrive/car/*/carcontroller.py
git commit -m "create dashcam release from release2"
2020-02-11 21:25:21 +00:00
git push -f origin release2-staging:dashcam-staging