diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 27eace0..5c2004f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -21,10 +21,6 @@ jobs: - run: | git fetch --prune --unshallow --no-recurse-submodules - git branch develop - git branch -u origin/develop develop - git branch master - git branch -u origin/master master - name: Install python venv & dependencies run: | diff --git a/version.SConscript b/version.SConscript index dddf147..2f7a1b8 100644 --- a/version.SConscript +++ b/version.SConscript @@ -21,7 +21,12 @@ if str(repo.head.ref)[:8] == "feature/": dev_branch = str(repo.head.ref) dev_feature = dev_branch[8:] dev_tag = [str(tag)[:-4] for tag in repo.tags if str(tag)[-3:] == "dev"][-1] - commits_from_develop = len(list(repo.iter_commits("develop..." + dev_branch))) + try: + commits_from_develop = len(list(repo.iter_commits("develop..." + dev_branch))) + except: + # local develop branch doesn't exist (most probably) + commits_from_develop = len(list(repo.iter_commits("origin/develop..." + dev_branch))) + v = dev_tag + "-" + dev_feature + ".%s" % commits_from_develop