Update release scripts
old-commit-hash: b645b1f27837af3657143a0c6d13ec7ba89dc91a
This commit is contained in:
67
release/build_release2.sh
Executable file
67
release/build_release2.sh
Executable file
@@ -0,0 +1,67 @@
|
||||
#!/usr/bin/env bash
|
||||
set e
|
||||
|
||||
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"
|
||||
|
||||
TARGET_DIR=/data/openpilot/
|
||||
|
||||
# Create folders
|
||||
rm -rf $TARGET_DIR
|
||||
mkdir -p $TARGET_DIR
|
||||
cd $TARGET_DIR
|
||||
|
||||
# Create git repo
|
||||
git init
|
||||
git remote add public git@github.com:commaai/$BRAND.git
|
||||
git fetch public
|
||||
|
||||
# Checkout devel
|
||||
git checkout public/devel
|
||||
git clean -xdf
|
||||
|
||||
# Create release2 with no history
|
||||
git branch -D release2 || true
|
||||
git checkout --orphan release2
|
||||
|
||||
VERSION=$(cat selfdrive/common/version.h | awk -F\" '{print $2}')
|
||||
git commit -m "openpilot v$VERSION"
|
||||
|
||||
# Build signed panda firmware
|
||||
pushd panda/board/
|
||||
cp -r /tmp/pandaextra $TARGET_DIR
|
||||
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
|
||||
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
|
||||
git push -f public release2-staging
|
||||
|
||||
# Create dashcam release
|
||||
git rm selfdrive/car/*/carcontroller.py
|
||||
|
||||
git commit -m "create dashcam release from release2"
|
||||
git push -f public release2-staging:dashcam-staging
|
||||
@@ -47,7 +47,7 @@ def start_build(name):
|
||||
|
||||
push = "PUSH=master-ci" if branch == "master" else ""
|
||||
|
||||
conn.send("%s /data/openpilot_source/release/go.sh\n" % push)
|
||||
conn.send("%s /data/openpilot_source/release/build_devel.sh\n" % push)
|
||||
conn.send('echo "RESULT:" $?\n')
|
||||
conn.send("exit\n")
|
||||
return conn
|
||||
|
||||
Reference in New Issue
Block a user