Files
espruino/set-version.patch
2026-02-12 20:00:00 -05:00

41 lines
1.8 KiB
Diff

Set version, bypassing git
index 09f1191..6db18e5 100644
--- a/scripts/common.py.1
+++ b/scripts/common.py
@@ -485,32 +485,10 @@ def get_script_dir():
return os.path.dirname(os.path.realpath(__file__))
def get_git_hash():
- return subprocess.check_output('git log -1 --format="%h"', shell=True).strip().decode("utf-8")
+ return "37bd2082786535c052928e5e7728115950ac8096"
def get_version():
- # Warning: the same release label derivation is also in the Makefile
- scriptdir = get_script_dir()
- jsutils = scriptdir+"/../src/jsutils.h"
- version = re.compile("^.*JS_VERSION.*\"(.*)\"");
- alt_release = os.getenv("ALT_RELEASE")
- if alt_release == None:
- # Default release labeling based on commits since last release tag
- latest_release = subprocess.check_output('git tag | grep RELEASE_ | sort | tail -1', shell=True).strip()
- commits_since_release = subprocess.check_output('git log --oneline '+latest_release.decode("utf-8")+'..HEAD | wc -l', shell=True).decode("utf-8").strip()
- else:
- # Alternate release labeling with fork name (in ALT_RELEASE env var) plus branch
- # name plus commit SHA
- sha = subprocess.check_output('git rev-parse --short HEAD', shell=True).strip()
- branch = subprocess.check_output('git name-rev --name-only HEAD', shell=True).strip()
- commits_since_release = alt_release + '_' + branch + '_' + sha
- for line in open(jsutils):
- match = version.search(line);
- if (match != None):
- v = match.group(1);
- if commits_since_release=="0": return v
- else: return v+"."+commits_since_release
- return "UNKNOWN"
-
+ return "2.28"
def get_name_or_space(jsondata):
if "name" in jsondata: return jsondata["name"]