File tree Expand file tree Collapse file tree 3 files changed +65
-0
lines changed Expand file tree Collapse file tree 3 files changed +65
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,8 @@ sudo chown eqemu:eqemu /home/eqemu/.ccache/ * -R
7
7
8
8
git submodule init && git submodule update
9
9
10
+ perl utils/scripts/build/tag-version.pl
11
+
10
12
mkdir -p build && cd build && cmake -DEQEMU_BUILD_TESTS=ON -DEQEMU_BUILD_LOGIN=ON -DEQEMU_BUILD_LUA=ON -DCMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=" -Os" -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -G ' Unix Makefiles' .. && make -j$(( `nproc`- 4 ))
11
13
12
14
curl https://raw.githubusercontent.com/Akkadius/eqemu-install-v2/master/eqemu_config.json --output eqemu_config.json
Original file line number Diff line number Diff line change
1
+ # !/usr/bin/perl
2
+ use strict;
3
+ use warnings FATAL => ' all' ;
4
+
5
+ open my $fh , ' <' , ' ./package.json' or die " Can't open file $! " ;
6
+ my $package_json = do {
7
+ local $/ ;
8
+ <$fh >
9
+ };
10
+
11
+ my $version = " " ;
12
+ sub trim ($)
13
+ {
14
+ my $string = shift ;
15
+ $string =~ s / ^\s +// ;
16
+ $string =~ s /\s +$// ;
17
+ return $string ;
18
+ }
19
+
20
+ # manually parse because we can't guarantee json module is available
21
+ # it's jank but it's quick and dirty
22
+ # this is only used in the build pipeline
23
+ foreach my $line (split (" \n " , $package_json )) {
24
+ if ($line =~ / version/i ) {
25
+ $version = $line ;
26
+ $version =~ s / version// g ;
27
+ $version =~ s / :// g ;
28
+ $version =~ s / "// g ;
29
+ $version =~ s / ,// g ;
30
+ $version = trim($version );
31
+ }
32
+ }
33
+
34
+ print " Version is [" . $version . " ]\n " ;
35
+
36
+ # server version file
37
+ my $version_file_name = " ./common/version.h" ;
38
+ open my $vfh , ' <' , $version_file_name or die " Can't open file $! " ;
39
+ my $version_file = do {
40
+ local $/ ;
41
+ <$vfh >
42
+ };
43
+
44
+ # write new version
45
+ my $new_version_file = " " ;
46
+ foreach my $line (split (" \n " , $version_file )) {
47
+ if ($line =~ / CURRENT_VERSION/i ) {
48
+ my @s = split (" \" " , $line );
49
+ if ($#s == 2) {
50
+ $line =~ s / $s[1]/ $version / g ;
51
+ }
52
+ }
53
+
54
+ $new_version_file .= $line . " \n " ;
55
+ }
56
+
57
+ open (my $wfh , ' >' , $version_file_name ) or die " Could not open file '$version_file_name ' $! " ;
58
+ print $wfh $new_version_file ;
59
+ close $wfh ;
60
+
61
+ print $new_version_file ;
Original file line number Diff line number Diff line change 13
13
New-Item - Path " $cwd \win-build-x64" - ItemType Directory
14
14
}
15
15
16
+ perl .\utils\scripts\build\tag- version.pl
17
+
16
18
Write-Information - MessageData " Creating build x64" - InformationAction Continue
17
19
Set-Location - Path " $cwd \win-build-x64"
18
20
cmake - Wno- dev - G " Visual Studio 17 2022" - A x64 - DEQEMU_BUILD_TESTS= ON - DEQEMU_BUILD_LOGIN= ON - DEQEMU_BUILD_ZLIB= ON " $cwd "
You can’t perform that action at this time.
0 commit comments