Skip to content

Commit

Permalink
Upgrade to latest hemtt
Browse files Browse the repository at this point in the history
  • Loading branch information
diwako committed Dec 24, 2023
1 parent 1b85edb commit ae5463c
Show file tree
Hide file tree
Showing 11 changed files with 526 additions and 104 deletions.
80 changes: 47 additions & 33 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,50 +3,64 @@ name: CI
on:
push:
branches:
- master
- master
pull_request:

jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: Checkout the source code
uses: actions/checkout@master
- name: Validate SQF
run: python3 tools/sqf_validator.py
- name: Validate Config
run: python3 tools/config_style_checker.py
- name: Check for BOM
uses: arma-actions/bom-check@master
- name: Checkout the source code
uses: actions/checkout@master
- name: Validate SQF
run: python3 tools/sqf_validator.py
- name: Validate Config
run: python3 tools/config_style_checker.py
- name: Check for BOM
uses: arma-actions/bom-check@master

lint:
runs-on: ubuntu-latest
steps:
- name: Checkout the source code
uses: actions/checkout@master
- name: Lint (sqflint)
uses: jokoho48/sqflint@master
continue-on-error: true # No failure due to many false-positives
- uses: actions/upload-artifact@master
with:
name: 'sqfLint Log'
path: 'sqf.log'
- name: Validate SQFLinter Logs
run: python3 tools/sqf_linter_LogChecker.py
- name: Checkout the source code
uses: actions/checkout@master
- name: Lint (sqflint)
uses: jokoho48/sqflint@master
continue-on-error: true # No failure due to many false-positives
- uses: actions/upload-artifact@master
with:
name: "sqfLint Log"
path: "sqf.log"
- name: Validate SQFLinter Logs
run: python3 tools/sqf_linter_LogChecker.py

stringtables:
runs-on: ubuntu-latest
steps:
- name: Install Python packages
run: |
pip3 install wheel
pip3 install setuptools
pip3 install pygithub
pip3 install pygithub3
- name: Checkout the source code
uses: actions/checkout@master
- name: Update Translation issue
if: github.repository == 'diwako/diwako_dui' && github.ref == 'refs/heads/master' && ! contains(github.event.head_commit.message, '[ci skip]')
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: python3 tools/stringtableDeploy.py
- name: Install Python packages
run: |
pip3 install wheel
pip3 install setuptools
pip3 install pygithub
pip3 install pygithub3
- name: Checkout the source code
uses: actions/checkout@master
- name: Update Translation issue
if: github.repository == 'diwako/diwako_dui' && github.ref == 'refs/heads/master' && ! contains(github.event.head_commit.message, '[ci skip]')
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: python3 tools/stringtableDeploy.py

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Setup HEMTT
uses: arma-actions/hemtt@v1
- name: Run HEMTT build
run: hemtt release
# - name: Upload Release
# uses: actions/upload-artifact@v4
# with:
# name: my-mod-latest
# path: release/my-mod-latest.zip
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

hemtt\.exe
armake2\.exe
.hemttout/
keys/
releases/
*.pbo
Expand All @@ -17,3 +18,5 @@ keys/*
*.sqfc
*.bat
*.dll

.vscode/*
14 changes: 14 additions & 0 deletions .hemtt/hooks/pre_release/set_version.rhai
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Read the current contents of the mod.cpp
// file from the project source
let version = HEMTT_DIRECTORY
.join("mod.cpp")
.open_file()
.read();
// Replace the placeholder version with the actual version
version.replace("{version}", HEMTT.project().version().to_string_short());
// Write the new contents to the build output
// create_file will overwrite the file if it exists
HEMTT_OUTPUT
.join("mod.cpp")
.create_file()
.write(version);
43 changes: 43 additions & 0 deletions .hemtt/project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name = "DUI Squad Radar"
prefix = "diwako_dui"
author = "Diwako"
mainprefix = "z"

[version]
path = "addons/main/script_version.hpp"
git_hash = 0

[files]
include = [
"mod.cpp",
"authors.txt",
"license.txt",
"logolarge.paa",
"logosmall.paa"
]
exclude = [
"*.psd",
"*.png",
"*.tga"
]

[hemtt.launch.default]
workshop = [
"450814997", # CBA_A3's Workshop ID
"463939057" # ACE3
]
parameters = [
"-skipIntro", # These parameters are passed to the Arma 3 executable
"-noSplash", # They do not need to be added to your list
"-showScriptErrors", # You can add additional parameters here
"-debug",
"-world=empty",
"-filePatching",
"C:\\Users\\diwako\\Documents\\Arma 3\\missions\\dui.VR\\mission.sqm", # Launch into existing Editor Mission - \\ needed
]

[hemtt.signing]
authority = "diwako_dui"

[hemtt.release]
folder = "diwako_dui"
2 changes: 1 addition & 1 deletion addons/main/script_mod.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#define VERSION_AR MAJOR,MINOR,PATCHLVL,BUILD
#define VERSION_PLUGIN MAJOR.MINOR.PATCHLVL.BUILD

#define REQUIRED_VERSION 2.04
#define REQUIRED_VERSION 2.14

#ifdef COMPONENT_BEAUTIFIED
#define COMPONENT_NAME QUOTE(DUI - COMPONENT_BEAUTIFIED)
Expand Down
6 changes: 3 additions & 3 deletions addons/main/script_version.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define MAJOR 1
#define MINOR 9
#define PATCHLVL 3
#define BUILD 1
#define MINOR 10
#define PATCHLVL 0
#define BUILD 0
48 changes: 0 additions & 48 deletions hemtt.toml

This file was deleted.

Loading

0 comments on commit ae5463c

Please sign in to comment.