Skip to content

Commit

Permalink
Merge branch 'master' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
Timi007 committed Dec 31, 2023
2 parents f9b40e8 + 513a0da commit ae1d102
Show file tree
Hide file tree
Showing 106 changed files with 1,365 additions and 3,413 deletions.
2 changes: 2 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ trim_trailing_whitespace = true
[*.md]
trim_trailing_whitespace = false

[*.yml]
indent_size = 2
14 changes: 13 additions & 1 deletion .github/workflows/arma.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,20 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout the source code
uses: actions/checkout@master
uses: actions/checkout@v4
- 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@v1

build:
runs-on: ubuntu-latest
steps:
- name: Checkout the source code
uses: actions/checkout@v4
- name: Setup HEMTT
uses: arma-actions/hemtt@v1
- name: Run HEMTT build
run: hemtt build
52 changes: 25 additions & 27 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,45 +12,36 @@ jobs:
if: github.repository == 'Metis-Team/mts_marker' && ! contains(github.event.head_commit.message, '[ci skip]')
runs-on: windows-latest
outputs:
NAME: ${{ env.NAME }}
MOD_NAME: ${{ env.MOD_NAME }}
PREFIX: ${{ env.PREFIX }}
MAIN_PREFIX: ${{ env.MAIN_PREFIX }}
VERSION: ${{ env.VERSION }}
VERSION_SHORT: ${{ env.VERSION_SHORT }}
SHA_SHORT: ${{ env.SHA_SHORT }}
steps:
- name: Checkout the source code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup HEMTT
uses: arma-actions/hemtt@v1

- name: Setup Tools
run: |
C:\msys64\usr\bin\wget.exe ${{ secrets.FTP_SERVER }}/arma_tools.zip --user ${{ secrets.FTP_USERNAME }} --password ${{ secrets.FTP_PASSWORD }} -q
Expand-Archive arma_tools.zip -DestinationPath ci
echo "Check HEMTT: $(Test-Path .\\ci\\hemtt.exe)"
echo "Check Binarize: $(Test-Path .\\ci\\binarize\\binarize_x64.exe)"
echo "Check ArmaScriptCompiler: $(Test-Path .\\ci\\ArmaScriptCompiler.exe)"
.\ci\hemtt.exe --version
hemtt --version
echo "Install Binarize dependencies"
cp .\ci\binarize\X3DAudio1_7.dll,.\ci\binarize\XAPOFX1_5.dll C:\Windows\System32\
echo "::group::Set Binarize registry path"
New-Item "HKCU:\\Software\\Bohemia Interactive\\binarize" -Force | New-ItemProperty -Name path -Value "${{ github.workspace }}\ci\binarize"
echo "::endgroup::"
echo "Set env variables"
echo "NAME=$(.\\ci\\hemtt.exe var name)" >> $env:GITHUB_ENV
echo "MOD_NAME=$(.\\ci\\hemtt.exe var modname)" >> $env:GITHUB_ENV
echo "PREFIX=$(.\\ci\\hemtt.exe var prefix)" >> $env:GITHUB_ENV
echo "MAIN_PREFIX=$(.\\ci\\hemtt.exe var mainprefix)" >> $env:GITHUB_ENV
echo "VERSION=$(.\\ci\\hemtt.exe var version)" >> $env:GITHUB_ENV
echo "VERSION_SHORT=$(($(.\\ci\\hemtt.exe var version) | Select-String -Pattern '^\d+\.\d+\.\d+').Matches.Value)" >> $env:GITHUB_ENV
echo "MOD_NAME=Metis_Marker" >> $env:GITHUB_ENV
$version = Select-String -Path "addons\\markers\\script_version.hpp" -Pattern '#define (MAJOR|MINOR|PATCHLVL|BUILD) (\d+)' | ForEach-Object { $_.Matches.Groups[2].Value } | Join-String -Separator "."
$version_short = (Select-String -InputObject $version -Pattern '^\d+\.\d+\.\d+').Matches.Value
echo "VERSION=$version" >> $env:GITHUB_ENV
echo "VERSION_SHORT=$version_short" >> $env:GITHUB_ENV
echo "SHA_SHORT=$(git rev-parse --short HEAD)" >> $env:GITHUB_ENV
- name: Setup P-Drive for ArmaScriptCompiler
run: |
echo "Creating P: and linking ${{ env.MAIN_PREFIX }}\${{ env.PREFIX }}\addons"
subst p: include
New-Item -ItemType Junction -Path "p:${{ env.MAIN_PREFIX }}\${{ env.PREFIX }}\addons" -Target "addons"
- name: Test Binarize
run: |
echo "::group::Run Binarize without arguments (look for missing DLLs)"
Expand All @@ -60,32 +51,38 @@ jobs:

- name: Build (HEMTT)
run: |
echo "${{ env.NAME }} v${{ env.VERSION_SHORT }} (${{ env.VERSION }}; ${{ env.SHA_SHORT }})"
.\ci\hemtt.exe build --release --ci --time
echo "${{ env.MOD_NAME }} v${{ env.VERSION }} (${{ env.SHA_SHORT }})"
hemtt release --no-archive
env:
BIOUTPUT: 1 # output binarize log

- name: Rename build folder
run: mv .hemttout/release .hemttout/@${{ env.MOD_NAME }}

- name: Upload Artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: ${{ env.MOD_NAME }}
path: releases/${{ env.VERSION }}/* # Upload folder to avoid double-zip artifacts
path: .hemttout/@*
retention-days: 1


publish-release:
needs: build
if: github.ref == 'refs/heads/release'
runs-on: ubuntu-latest
steps:
- name: Download Artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3

- name: Prepare Archives
run: |
mv ${{ needs.build.outputs.MOD_NAME }}/* .
echo "::group::Archive build"
zip -r ${{ needs.build.outputs.MOD_NAME }}_${{ needs.build.outputs.VERSION_SHORT }}.zip @${{ needs.build.outputs.MOD_NAME }}
echo "::endgroup::"
- name: Prepare GitHub
- name: Prepare GitHub Release
id: release_drafter
uses: release-drafter/release-drafter@v5
with:
Expand All @@ -94,8 +91,9 @@ jobs:
version: ${{ needs.build.outputs.VERSION }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload to GitHub
uses: actions/upload-release-asset@v1

- name: Upload mod archive to GitHub Release
uses: shogo82148/[email protected]
with:
upload_url: ${{ steps.release_drafter.outputs.upload_url }}
asset_path: ./${{ needs.build.outputs.MOD_NAME }}_${{ needs.build.outputs.VERSION_SHORT }}.zip
Expand Down
10 changes: 5 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
release/*
*.cache
*.pbo
texHeaders.bin
Expand All @@ -9,10 +8,11 @@ Thumbs.db
*.sqfc
*.exe

## Added by HEMTT
#### HEMTT
hemtt
hemtt.exe
releases/*
keys/*
.hemtt/local
release/
releases/
keys/
.hemttout/
####
14 changes: 14 additions & 0 deletions .hemtt/hooks/post_release/01_rename_zip.rhai
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
let releases = HEMTT_RFS.join("releases");

let src = releases.join(HEMTT.project().prefix() + "-" + HEMTT.project().version().to_string() + ".zip");

if (src.exists()) {
let dst = releases.join(HEMTT.project().name() + "_" + HEMTT.project().version().to_string_short() + ".zip");

print("Moving archive to " + dst);
if (!src.move(dst)) {
fatal("Failed to rename " + src + " to " + dst);
}
} else {
warn("Cannot rename archive. File " + src + " does not exist!");
}
41 changes: 41 additions & 0 deletions .hemtt/project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name = "Metis_Marker"
mainprefix = "z"
prefix = "mts"
author = "Bix, PhILoX, Timi007"

[files]
include = [
"mod.cpp",
"README.md",
"LICENSE",
"mts_picture.paa",
"mts_logo_small.paa",
"mts_logo_over_small.paa",
"meta.cpp"
]

[signing]
authority = "mts_markers"

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

[asc]
enabled = true
exclude = [
"/initsettings.sqf",
"/initkeybinds.sqf",
"/xeh_prep.sqf",
]

[hemtt.config]
preset = "Hemtt"

[hemtt.release]
folder = "Metis_Marker"

[hemtt.launch.default]
workshop = [
"450814997", # CBA_A3's Workshop ID
]
30 changes: 0 additions & 30 deletions .hemtt/template/scripts/get_version.lua

This file was deleted.

8 changes: 7 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,15 @@
},
"search.exclude": {
"**/venv": true,
".hemttout/dev": true,
".hemttout/build": true,
".hemttout/release": true,
},
"explorer.autoRevealExclude": {
"**/venv": true
"**/venv": true,
".hemttout/dev": true,
".hemttout/build": true,
".hemttout/release": true,
},
"sqf.enableACE3": false,
"sqf.enableCBA": true,
Expand Down
13 changes: 4 additions & 9 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"label": "Build Debug",
"detail": "Build Arma addon with HEMTT in debug mode.",
"type": "process",
"command": "hemtt.exe",
"args": ["build"],
"command": "hemtt",
"args": ["dev"],
"group": "build",
"presentation": {
"close": true,
Expand All @@ -18,13 +18,8 @@
"label": "Build Release",
"detail": "Build Arma addon with HEMTT for release.",
"type": "process",
"command": "hemtt.exe",
"args": [
"build",
"--release",
"--time",
"-f"
],
"command": "hemtt",
"args": ["release"],
"group": "build"
}
]
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<p align="center">
<a href="https://github.com/Metis-Team/mts_marker/releases/latest">
<img src="https://img.shields.io/badge/Version-1.8.0-blue.svg?style=flat-square" alt="Metis Marker Version">
<img src="https://img.shields.io/badge/Version-1.8.1-blue.svg?style=flat-square" alt="Metis Marker Version">
</a>
<a href="https://github.com/Metis-Team/mts_marker/releases/latest">
<img src="https://img.shields.io/github/downloads/Metis-Team/mts_marker/total.svg?style=flat-square&label=Downloads" alt="Metis Marker Downloads">
Expand Down Expand Up @@ -92,14 +92,14 @@ Metis Marker is licensed under Arma Public License No Derivatives ([APL-ND](http
<img src="https://i.imgur.com/ZHi6e4d.jpg" width="1024">
</p>
<p align="center">
<img src="https://i.imgur.com/wEkaPVh.jpg" width="1024">
<img src="https://i.imgur.com/4aQSkFt.jpg" width="1024">
</p>
<p align="center">
<img src="https://i.imgur.com/0WT8eAE.jpg" width="1024">
</p>
<p align="center">
<img src="https://i.imgur.com/t5qGMRv.jpg" width="1024">
<img src="https://i.imgur.com/ZlA9GQw.jpg" width="1024">
</p>
<p align="center">
<img src="https://i.imgur.com/x6EY6YK.jpg" width="1024">
<img src="https://i.imgur.com/4yb05tw.jpg" width="1024">
</p>
Loading

0 comments on commit ae1d102

Please sign in to comment.