Include master commit and build date in master-ci commit (#24548)

* save commit information in master-ci

* cleanup

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
pull/24558/head
ntegan1 3 years ago committed by GitHub
parent 7996fd37ef
commit 2088775543
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 17
      release/build_devel.sh

@ -51,20 +51,23 @@ if [ ! -z "$EXTRA_FILES" ]; then
cp -pR --parents $EXTRA_FILES $TARGET_DIR/ cp -pR --parents $EXTRA_FILES $TARGET_DIR/
fi fi
# append source commit hash and build date to version
GIT_HASH=$(git --git-dir=$SOURCE_DIR/.git rev-parse --short HEAD)
DATETIME=$(date '+%Y-%m-%dT%H:%M:%S')
VERSION=$(cat $SOURCE_DIR/selfdrive/common/version.h | awk -F\" '{print $2}')
#echo "#define COMMA_VERSION \"$VERSION-$GIT_HASH-$DATETIME\"" > $TARGET_DIR/selfdrive/common/version.h
# in the directory # in the directory
cd $TARGET_DIR cd $TARGET_DIR
rm -f panda/board/obj/panda.bin.signed rm -f panda/board/obj/panda.bin.signed
# include source commit hash and build date in commit
GIT_HASH=$(git --git-dir=$SOURCE_DIR/.git rev-parse HEAD)
DATETIME=$(date '+%Y-%m-%dT%H:%M:%S')
VERSION=$(cat $SOURCE_DIR/selfdrive/common/version.h | awk -F\" '{print $2}')
echo "[-] committing version $VERSION T=$SECONDS" echo "[-] committing version $VERSION T=$SECONDS"
git add -f . git add -f .
git status git status
git commit -a -m "openpilot v$VERSION release" git commit -a -m "openpilot v$VERSION release
date: $DATETIME
master commit: $GIT_HASH
"
if [ ! -z "$BRANCH" ]; then if [ ! -z "$BRANCH" ]; then
echo "[-] Pushing to $BRANCH T=$SECONDS" echo "[-] Pushing to $BRANCH T=$SECONDS"

Loading…
Cancel
Save