mirror of
https://github.com/HIllya51/LunaHook.git
synced 2024-10-22 23:18:16 +08:00
version
This commit is contained in:
parent
ea40ca6f8f
commit
9e29a5031f
22
.github/workflows/release.yml
vendored
22
.github/workflows/release.yml
vendored
@ -1,12 +1,7 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
workflow_dispatch: # allows manual triggering
|
||||
inputs:
|
||||
create_release:
|
||||
description: 'Create new release'
|
||||
required: true
|
||||
type: string
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build_xp:
|
||||
@ -49,10 +44,13 @@ jobs:
|
||||
with:
|
||||
name: ${{ matrix.target }}
|
||||
path: builds/${{ matrix.target }}.zip
|
||||
- name: loadversion
|
||||
id: loadversion
|
||||
run: python build.py loadversion | Out-File -FilePath $Env:GITHUB_OUTPUT -Encoding utf8 -Append
|
||||
- name: Release LunaHook
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
tag_name: ${{ github.event.inputs.create_release }}
|
||||
tag_name: ${{ steps.loadversion.outputs.version }}
|
||||
files: builds/${{ matrix.target }}.zip
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
@ -104,10 +102,13 @@ jobs:
|
||||
with:
|
||||
name: ${{ matrix.target }}
|
||||
path: builds/${{ matrix.target }}.zip
|
||||
- name: loadversion
|
||||
id: loadversion
|
||||
run: python build.py loadversion | Out-File -FilePath $Env:GITHUB_OUTPUT -Encoding utf8 -Append
|
||||
- name: Release LunaHook
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
tag_name: ${{ github.event.inputs.create_release }}
|
||||
tag_name: ${{ steps.loadversion.outputs.version }}
|
||||
files: builds/${{ matrix.target }}.zip
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
@ -150,10 +151,13 @@ jobs:
|
||||
with:
|
||||
name: ${{ matrix.target }}
|
||||
path: builds/${{ matrix.target }}.zip
|
||||
- name: loadversion
|
||||
id: loadversion
|
||||
run: python build.py loadversion | Out-File -FilePath $Env:GITHUB_OUTPUT -Encoding utf8 -Append
|
||||
- name: Release LunaHook
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
tag_name: ${{ github.event.inputs.create_release }}
|
||||
tag_name: ${{ steps.loadversion.outputs.version }}
|
||||
files: builds/${{ matrix.target }}.zip
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
@ -61,7 +61,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/version)
|
||||
include(generate_product_version)
|
||||
|
||||
set(VERSION_MAJOR 3)
|
||||
set(VERSION_MINOR 8)
|
||||
set(VERSION_MINOR 9)
|
||||
set(VERSION_PATCH 0)
|
||||
set(VERSION_REVISION 0)
|
||||
|
||||
|
13
build.py
13
build.py
@ -1,9 +1,16 @@
|
||||
import os, sys
|
||||
import os, sys, re
|
||||
import subprocess
|
||||
|
||||
rootDir = os.path.dirname(__file__)
|
||||
|
||||
|
||||
if len(sys.argv) and sys.argv[1] == "loadversion":
|
||||
os.chdir(rootDir)
|
||||
with open("CMakeLists.txt", "r", encoding="utf8") as ff:
|
||||
pattern = r"set\(VERSION_MAJOR\s*(\d+)\s*\)\nset\(VERSION_MINOR\s*(\d+)\s*\)\nset\(VERSION_PATCH\s*(\d+)\s*\)"
|
||||
match = re.findall(pattern, ff.read())[0]
|
||||
version_major, version_minor, version_patch = match
|
||||
versionstring = f"v{version_major}.{version_minor}.{version_patch}"
|
||||
print("version=" + versionstring)
|
||||
exit()
|
||||
vcltlFile = "https://github.com/Chuyu-Team/VC-LTL5/releases/download/v5.0.9/VC-LTL-5.0.9-Binary.7z"
|
||||
vcltlFileName = "VC-LTL-5.0.9-Binary.7z"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user