Get git commit hash to address collisions

This commit is contained in:
2023-01-30 14:49:55 -05:00
parent 7bea684ecf
commit e61493239e

View File

@@ -614,7 +614,7 @@ fromSource() {
debug "${FUNCNAME[0]}" debug "${FUNCNAME[0]}"
declare src_url="https://github.com/openwrt/openwrt.git" declare src_url="https://github.com/openwrt/openwrt.git"
declare pkg kopt opt declare pkg kopt opt commit
declare -a make_opts config_opts declare -a make_opts config_opts
declare -g SEED_FILE="$GITWORKTREEDIR/.config" declare -g SEED_FILE="$GITWORKTREEDIR/.config"
@@ -628,6 +628,9 @@ fromSource() {
git -C "$GITSRCDIR" pull git -C "$GITSRCDIR" pull
commit=$(git -C "$GITSRCDIR" rev-parse HEAD)
debug "commit hash: $commit"
if [[ $RELEASE == "snapshot" ]]; then if [[ $RELEASE == "snapshot" ]]; then
git -C "$GITSRCDIR" worktree add -d "$GITWORKTREEDIR" master git -C "$GITSRCDIR" worktree add -d "$GITWORKTREEDIR" master
else else