1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-04 17:59:44 +00:00
Commit Graph

45 Commits

Author SHA1 Message Date
Bhadra
3bd2869e8d feat: Add Windows package manager publishing infrastructure (#343) (#356)
* feat: Add Windows package manager publishing infrastructure (#343)

- Add comprehensive release build scripts:
  - build-release.ps1: Creates portable ZIP + SHA256 checksums
  - build-exe.ps1: Standalone executable builder (PS2EXE)
  - build-msi.ps1: MSI installer builder (WiX Toolset)

- Add GitHub Actions workflow:
  - Automated builds on version tags
  - Runs tests before building
  - Auto-creates GitHub releases with artifacts

- Add package manager manifests:
  - WinGet: Complete manifests ready for microsoft/winget-pkgs
  - Chocolatey: Full package with install/uninstall scripts
  - Scoop: JSON manifest ready for submission

- Add comprehensive documentation:
  - RELEASE.md: Complete guide for building and publishing
  - Package-specific READMEs with submission instructions
  - ISSUE-343-SUMMARY.md: Quick reference and next steps

Successfully tested: Built mole-1.0.0-x64.zip (5 MB) with SHA256 checksums

Addresses #343

* chore: update contributors [skip ci]

* fix: Support uppercase V and -windows suffix in release workflow

* fix: Remove duplicate parameter definitions in clean, optimize, and purge commands

- bin/clean.ps1: Remove duplicate System, GameMedia, DebugMode, Whitelist params
- bin/optimize.ps1: Remove duplicate DebugMode param
- bin/purge.ps1: Remove duplicate DebugMode and Paths params

These duplicates were causing parser errors in tests.

* fix: Update test regex to match --dry-run format in help text

The help output shows --dry-run (kebab-case) but test was checking for DryRun (PascalCase).
Updated regex to accept both formats.

* fix: Handle Pester 5.x result object properties correctly

Pester 5.x uses different property names (Passed.Count, Failed.Count)
instead of PassedCount, FailedCount. Added fallback logic to support both formats.

* fix: Simplify Pester result parsing with better fallback logic

Since Pester already prints test results, just check for failures
and assume success if we can't parse the result object. This handles
different Pester versions more gracefully.

* feat: Add MSI and EXE builds to release workflow

- Install WiX Toolset for MSI creation
- Install PS2EXE module for standalone EXE
- Build all three formats: ZIP, MSI, EXE
- MSI and EXE builds marked optional (continue-on-error)
- Upload all artifacts to GitHub release
- Update release notes with installation instructions for all formats
- Add SHA256 verification instructions for each format

* fix: Resolve MSI and EXE build failures

MSI build fix:
- Use UTF8 without BOM for temp WXS file to avoid XML parsing errors
- WiX compiler requires clean UTF8 encoding without byte order mark

EXE build fix:
- Remove hashtable iteration that modified collection during enumeration
- Exclude null iconFile parameter from ps2exe params instead of removing it
- Prevents 'Collection was modified' exception

* fix: Properly handle encoding and version format for MSI and EXE builds

MSI fix:
- Use System.IO.File.ReadAllText/WriteAllText for consistent UTF8 without BOM
- Prevents XML parsing errors in WiX compiler

EXE fix:
- Extract numeric version only (strip '-windows' suffix) for ps2exe
- ps2exe requires version in format n.n.n.n (numeric only)
- Fallback to 1.0.0.0 if version parsing fails

* fix: Use WriteAllBytes to ensure no BOM in MSI WXS file

- Convert string to UTF8 bytes manually
- Write bytes directly to file
- This guarantees no byte order mark is added
- Prevents WiX XML parsing error at position 7

* fix: Read WXS source as bytes to completely avoid BOM issues

- Read source file as raw bytes
- Convert bytes to string using UTF8Encoding without BOM
- Replace version in string
- Convert back to bytes and write
- This completely avoids PowerShell's Get-Content BOM handling

* chore: Simplify release workflow - remove MSI build, minimal release notes

- Remove MSI build steps (has persistent BOM/encoding issues)
- Remove WiX Toolset installation
- Simplify release notes to bare minimum
- Focus on ZIP and EXE artifacts only

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-01-24 00:08:24 +08:00
Tw93
edf5ed09a9 chore: restructure windows branch (move windows/ content to root, remove macos files) 2026-01-10 13:23:29 +08:00
Oleksandr Redko
f1de7ffd18 fix: golangci-lint config 2026-01-08 10:20:42 +02:00
Tw93
68c84e3bfc chore: optimize check.sh to use goimports for formatting if available 2026-01-08 14:34:26 +08:00
Matt Kneale
0cc205209c feat: add golangci-lint for Go code quality
- Add .golangci.yml configuration enabling govet, staticcheck, errcheck, gosimple, ineffassign, unused, gofmt, and goimports linters
- Update scripts/check.sh to run golangci-lint with go vet fallback
- Update CI workflow to install golangci-lint in both format and quality jobs
- Add golangci-lint to CONTRIBUTING.md setup instructions

Closes #266
2026-01-08 14:30:54 +08:00
Tw93
9f504dc249 feat: implement installer cleanup functionality, add ZIP and file descriptor installer tests, and update README 2026-01-04 15:46:48 +08:00
Tw93
6dfd675417 refactor: standardize epoch time retrieval with get_epoch_seconds and ensure locale-independent string transformations. 2026-01-03 18:07:47 +08:00
Tw93
6698099215 chore: auto format code 2026-01-03 06:11:23 +00:00
Tw93
8db91730b3 feat: Add conditional colorization to BATS test output based on terminal capabilities and formatter. 2026-01-03 13:59:19 +08:00
Tw93
ac5c0e3c9d fix: Add Library directory existence check to clean script and enhance test script for bats version compatibility. 2026-01-03 12:30:53 +08:00
Tw93
4aef2de0fc refactor: Consolidate and refactor test suite by removing redundant files and simplifying test execution. 2026-01-03 12:04:57 +08:00
Tw93
910e79df4e feat: Improve clean command's regex handling and pnpm cache cleaning, enhance test output, update completion descriptions, and clarify installation instructions. 2026-01-02 18:50:42 +08:00
Tw93
fdcaa7fa25 Fix workflow errors 2025-12-31 22:54:51 +08:00
Tw93
592f02e6e2 feat: overhaul quality checks and expand test suite for clean and optimize features 2025-12-31 18:13:37 +08:00
Tw93
9aa569cbb6 feat: Enhance clean, optimize, analyze, and status commands, and update security audit documentation. 2025-12-31 16:23:31 +08:00
Tw93
8d935c6140 feat: Improve clean_local_snapshots robustness and simplify Raycast quick launcher setup. 2025-12-31 10:22:53 +08:00
Tw93
bd1c37d627 fix: reduce raycast setup prompts after first run 2025-12-30 23:40:19 +08:00
Tw93
f33304ae12 chore: auto format code 2025-12-30 15:06:41 +00:00
Tw93
98afaabcff fix: make raycast setup safe in non-interactive 2025-12-30 23:05:53 +08:00
Tw93
e2c1b62046 chore: auto format code 2025-12-30 15:02:31 +00:00
Thijs van Hal
5d6a4640a8 enhance raycast quick launcher setup script 2025-12-30 12:01:27 +01:00
Tw93
6c1fcd23d7 feat: optimize clean operation performance by pre-expanding whitelist patterns, improving size calculation, and adapting parallel processing based on file types, alongside test suite enhancements. 2025-12-30 17:13:43 +08:00
Tw93
af61748977 release binaries via GH releases and update installer fallback 2025-12-29 20:23:11 +08:00
Tw93
b67204f959 feat: remove SQLite vacuum optimization, enhance CJK/emoji width calculation, and improve system cleanup and UI feedback. 2025-12-29 00:29:42 +08:00
Nathan Broadbent
f838e9517d fix: use BSD stat explicitly to avoid GNU coreutils conflict (#160) 2025-12-26 10:43:18 +08:00
Tw93
87fdd26272 feat: Add git hooks to enforce universal binary builds and improve CPU metric calculation. 2025-12-22 16:30:22 +08:00
Tw93
73cf2dff96 build: Disable CGO for analyze-go and status-go binaries. 2025-12-21 21:38:39 +08:00
Tw93
0427dbb6c0 feat: Expand critical system component protection in clean user logic and apply minor shell script fixes. 2025-12-17 20:42:25 +08:00
Tw93
2d7932025f Parallel scanning and testing 2025-12-11 19:24:23 +08:00
Tw93
dd841891ad Test extensive coverage and improvement 2025-12-11 11:31:09 +08:00
Tw93
78e6743666 Performance and speed optimization 2025-12-08 15:34:51 +08:00
Tw93
4bd4ffc7be Reconstruct clean lib code 2025-12-01 16:58:35 +08:00
Tw93
df3eda66d0 update status 2025-11-21 19:15:29 +08:00
Tw93
3a33cec76e update status 2025-11-21 19:13:20 +08:00
Tw93
45d31e880c Add System Status Dashboard 2025-11-21 17:58:31 +08:00
Tw93
f8f9d7db7d Use more robust scripts 2025-11-19 09:45:14 +08:00
Tw93
a900d03bef Refactor Go analysis capabilities 2025-11-18 18:23:33 +08:00
Tw93
264faeb605 Section title is more concise and easy to read 2025-11-16 00:39:48 +08:00
Tw93
9ab7d9abf8 Raycast installation script use optimization 2025-11-15 19:23:02 +08:00
Tw93
f7dff3b798 Test case update 2025-11-15 13:40:43 +08:00
Tw93
cccc41990e Apply scan cache to simplify 2025-11-15 13:20:58 +08:00
Tw93
53ebd90d91 Improve unit tests for greater safety 2025-11-15 13:11:00 +08:00
Tw93
03b5896070 Replace optimize module with pure Bash 2025-11-14 21:19:24 +08:00
Tw93
f63f561673 Simple formatting 2025-10-13 10:20:46 +08:00
Tw93
cf821cdc4b Code support format detection 2025-10-12 20:49:10 +08:00