mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-06-20 21:42:05 +08:00
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>
This commit is contained in:
+10
-7
@@ -51,20 +51,23 @@ if [ ! -z "$EXTRA_FILES" ]; then
|
||||
cp -pR --parents $EXTRA_FILES $TARGET_DIR/
|
||||
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
|
||||
cd $TARGET_DIR
|
||||
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"
|
||||
git add -f .
|
||||
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
|
||||
echo "[-] Pushing to $BRANCH T=$SECONDS"
|
||||
|
||||
Reference in New Issue
Block a user