File tree 1 file changed +16
-1
lines changed
1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,22 @@ if [[ "${CODER_FORCE_VERSION:-}" != "" ]]; then
20
20
exit 0
21
21
fi
22
22
23
- last_tag=" $( git describe --tags --abbrev=0) "
23
+ # To make contributing easier, if the upstream isn't coder/coder and there are
24
+ # no tags we will fall back to 0.1.0 with devel suffix.
25
+ if [[ " $( git remote get-url origin) " != * coder/coder* ]] && [[ " $( git tag) " == " " ]]; then
26
+ log
27
+ log " INFO(version.sh): It appears you've checked out a fork of Coder."
28
+ log " INFO(version.sh): By default GitHub does not include tags when forking."
29
+ log " INFO(version.sh): We will use the default version 0.1.0 for this build."
30
+ log " INFO(version.sh): To pull tags from upstream, use the following commands:"
31
+ log " INFO(version.sh): - git remote add upstream https://github.com/coder/coder.git"
32
+ log " INFO(version.sh): - git fetch upstream"
33
+ log
34
+ last_tag=" v0.1.0"
35
+ else
36
+ last_tag=" $( git describe --tags --abbrev=0) "
37
+ fi
38
+
24
39
version=" $last_tag "
25
40
26
41
# If the HEAD has extra commits since the last tag then we are in a dev version.
You can’t perform that action at this time.
0 commit comments