Skip to content

Commit

Permalink
update action
Browse files Browse the repository at this point in the history
  • Loading branch information
aiqinxuancai committed Feb 5, 2024
1 parent 23545f6 commit 8e29808
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/msbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ jobs:
uses: microsoft/setup-msbuild@v1.1

- name: Set Version
run: (Get-Content "${{env.SOLUTION_FILE_PATH}}\AutoLinker.h") -replace "0\.0\.0", "$env:GITHUB_REF_NAME" | Set-Content "${{env.SOLUTION_FILE_PATH}}\AutoLinker.h"
run: (Get-Content "${{env.SOLUTION_FILE_PATH}}\AutoLinker.h" -Raw) -replace "0\.0\.0", "$env:GITHUB_REF_NAME" | Set-Content "${{env.SOLUTION_FILE_PATH}}\AutoLinker.h" -Encoding UTF8
shell: pwsh

- name: Set Build
run: (Get-Content "${{env.SOLUTION_FILE_PATH}}\AutoLinker.h") -replace "1000000", "$env:GITHUB_RUN_NUMBER" | Set-Content "${{env.SOLUTION_FILE_PATH}}\AutoLinker.h"
run: (Get-Content "${{env.SOLUTION_FILE_PATH}}\AutoLinker.h" -Raw) -replace "1000000", "$env:GITHUB_RUN_NUMBER" | Set-Content "${{env.SOLUTION_FILE_PATH}}\AutoLinker.h" -Encoding UTF8
shell: pwsh

- name: Build
Expand Down
12 changes: 6 additions & 6 deletions Version.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#pragma once
#pragma once
// Version.h
#ifndef VERSION_H
#define VERSION_H
Expand All @@ -8,22 +8,22 @@

class Version {
public:
// 默认构造函数
// 默认构造函数
Version() = default;
// 从整数构造
// 从整数构造
Version(int major, int minor, int build = -1, int revision = -1);
// 从字符串构造
// 从字符串构造
Version(const std::string& versionStr);

// 比较操作符
// 比较操作符
bool operator==(const Version& other) const;
bool operator!=(const Version& other) const;
bool operator<(const Version& other) const;
bool operator>(const Version& other) const;
bool operator<=(const Version& other) const;
bool operator>=(const Version& other) const;

// 输出版本号
// 输出版本号
friend std::ostream& operator<<(std::ostream& os, const Version& v);

private:
Expand Down

0 comments on commit 8e29808

Please sign in to comment.