File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change 41
41
- name : Add MSBuild to PATH
42
42
uses : microsoft/setup-msbuild@6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce # v2.0.0
43
43
44
- - name : Fetch tags
45
- # This is required for git describe --always to work for git-version.cpp.
46
- run : git fetch --deepen=15000 --no-recurse-submodules --tags || exit 0
44
+ - name : Check Valid Version Tags
45
+ id : valid-tags
46
+ shell : bash
47
+ run : |
48
+ # This is required for git describe --always to work for git-version.cpp.
49
+ git fetch --deepen=15000 --no-recurse-submodules --tags || exit 0
50
+ echo "count=$(git tag -l 'v[0-9]*' | wc -l | tr -d ' ')" >> $GITHUB_OUTPUT # $env:GITHUB_OUTPUT on pwsh
51
+
52
+ - name : Fetch upstream tags # Fallback to fetching tags from upstream
53
+ if : steps.valid-tags.outputs.count == '0'
54
+ run : |
55
+ # TODO: should try to fetch tags from whereever this repo was forked from before fetching from official repo
56
+ git remote add upstream https://github.com/hrydgard/ppsspp.git
57
+ git fetch --deepen=15000 --no-recurse-submodules --tags upstream || exit 0
47
58
48
59
- name : Create git-version.cpp for Windows # Not sure why the one at git-version-gen.cmd couldn't get the version properly.
49
60
# if: github.ref_type == 'tag'
You can’t perform that action at this time.
0 commit comments