Skip to content
This repository was archived by the owner on Dec 3, 2024. It is now read-only.

Commit 2ec0fe7

Browse files
committed
hemtt stuff
1 parent 337c831 commit 2ec0fe7

12 files changed

+107
-0
lines changed
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
HEMTT.script("update_3_build");
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
HEMTT.script("update_1_minor");

.hemtt/scripts copy/bump_0_major.bat

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
cd ..
2+
cd ..
3+
hemtt script update_major.rhai

.hemtt/scripts copy/bump_1_minor.bat

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
cd ..
2+
cd ..
3+
hemtt script update_minor.rhai

.hemtt/scripts copy/bump_2_patch.bat

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
cd ..
2+
cd ..
3+
hemtt script update_patch.rhai

.hemtt/scripts copy/bump_3_build.bat

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
cd ..
2+
cd ..
3+
hemtt script update_build.rhai
+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// Read the current contents of script_version.hpp
2+
let script_version = HEMTT_RFS.join("addons")
3+
.join("main")
4+
.join("script_version.hpp")
5+
.open_file()
6+
.read();
7+
8+
// Replace the current version with the new version
9+
let prefix = "#define MAJOR ";
10+
let current = HEMTT.project().version().major();
11+
let next = current + 1;
12+
script_version.replace("#define MAJOR " + current.to_string(),"#define MAJOR " + next.to_string());
13+
14+
print(script_version);
15+
16+
// Updating major version should reset minor number
17+
current = HEMTT.project().version().minor();
18+
script_version.replace("#define MINOR " + current.to_string(), "#define MINOR 0");
19+
20+
// Updating minor version should reset patch number
21+
current = HEMTT.project().version().patch();
22+
script_version.replace("#define PATCH " + current.to_string(), "#define PATCH 0");
23+
24+
// Write the modified contents to script_version.hpp
25+
HEMTT_RFS.join("addons")
26+
.join("main")
27+
.join("script_version.hpp")
28+
.create_file()
29+
.write(script_version);
+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// Read the current contents of script_version.hpp
2+
let script_version = HEMTT_RFS.join("addons")
3+
.join("main")
4+
.join("script_version.hpp")
5+
.open_file()
6+
.read();
7+
8+
// Replace the current version with the new version
9+
let prefix = "#define MINOR ";
10+
let current = HEMTT.project().version().minor();
11+
let next = current + 1;
12+
13+
script_version.replace(prefix + current.to_string(), prefix + next.to_string());
14+
15+
// Updating minor version should reset patch number
16+
current = HEMTT.project().version().patch();
17+
script_version.replace("#define PATCH " + current.to_string(), "#define PATCH 0");
18+
19+
// Write the modified contents to script_version.hpp
20+
HEMTT_RFS.join("addons")
21+
.join("main")
22+
.join("script_version.hpp")
23+
.create_file()
24+
.write(script_version);
+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// Read the current contents of script_version.hpp
2+
let script_version = HEMTT_RFS.join("addons")
3+
.join("main")
4+
.join("script_version.hpp")
5+
.open_file()
6+
.read();
7+
8+
// Replace the current version with the new version
9+
let prefix = "#define PATCH ";
10+
let current = HEMTT.project().version().patch();
11+
let next = current + 1;
12+
13+
script_version.replace(prefix + current.to_string(), prefix + next.to_string());
14+
15+
16+
// Write the modified contents to script_version.hpp
17+
HEMTT_RFS.join("addons")
18+
.join("main")
19+
.join("script_version.hpp")
20+
.create_file()
21+
.write(script_version);
+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Read the current contents of script_version.hpp
2+
let script_version = HEMTT_RFS.join("addons")
3+
.join("main")
4+
.join("script_version.hpp")
5+
.open_file()
6+
.read();
7+
8+
// Replace the current version with the new version
9+
let prefix = "#define BUILD ";
10+
let current = HEMTT.project().version().build();
11+
let next = current + 1;
12+
script_version.replace(prefix + current.to_string(), prefix + next.to_string());
13+
14+
// Write the modified contents to script_version.hpp
15+
HEMTT_RFS.join("addons")
16+
.join("main")
17+
.join("script_version.hpp")
18+
.create_file()
19+
.write(script_version);
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)