only:find_branch_name_or_snapshot.sh

This commit is contained in:
Andrey 2024-08-12 17:07:02 -04:00
parent 207d8d224f
commit f68f93b28d
2 changed files with 15 additions and 3 deletions

View File

@ -0,0 +1,9 @@
#!/usr/bin/env bash
BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)
if [ "$BRANCH_NAME" = "master" ]; then
echo "snapshot"
else
echo "$BRANCH_NAME"
fi

View File

@ -29,14 +29,17 @@ endif
# This weird if statement structure is because Make doesn't have &&
ifeq ($(AUTOMATION_LTS),true)
ifneq (,$(AUTOMATION_REF))
FOLDER = rusefi.$(AUTOMATION_REF).$(BUNDLE_NAME)
BRANCH_PART_OF_FOLDER=$(AUTOMATION_REF)
else
FOLDER = rusefi.lts_unknown.$(BUNDLE_NAME)
BRANCH_PART_OF_FOLDER=lts_unknown
endif
else
FOLDER = rusefi.snapshot.$(BUNDLE_NAME)
# todo: (as long as not Windows linux?) invoke bin/find_branch_name_or_snapshot.sh instead?
BRANCH_PART_OF_FOLDER=snapshot
endif
FOLDER = rusefi.$(BRANCH_PART_OF_FOLDER).$(BUNDLE_NAME)
DELIVER = deliver
ARTIFACTS = ../artifacts