uxn-tal 0.7.4

uxntal:// protocol | a Rust library for assembling TAL (Tal Assembly Language) files into UXN ROM files
Documentation
version: "3"

vars:
  REPO_URL: https://git.sr.ht/~angelwood/combee
  REPO_DIR: combee

tasks:
  default:
    deps: [build]

  # Cross-platform wrapper
  build:
    desc: Clone/update and build combee
    deps: [clone]
    cmds:
      - task: build:posix
      - task: build:win

  # --- Clone/update ---
  clone:
    desc: Clone or update the repository
    cmds:
      - task: clone:posix
      - task: clone:win

  clone:posix:
    platforms: [linux, darwin]
    desc: Clone/update on macOS/Linux
    cmds:
      - >

        [ -d "{{.REPO_DIR}}" ]
        && git -C "{{.REPO_DIR}}" pull --rebase
        || git clone "{{.REPO_URL}}" "{{.REPO_DIR}}"

  clone:win:
    platforms: [windows]
    desc: Clone/update on Windows
    cmds:
      - cmd: powershell -NoProfile -Command "if (Test-Path '{{.REPO_DIR}}') { git -C '{{.REPO_DIR}}' pull --rebase } else { git clone '{{.REPO_URL}}' '{{.REPO_DIR}}' }" 

  # --- Build ---
  build:posix:
    platforms: [linux, darwin]
    desc: Build on macOS/Linux using build-smol.sh
    dir: "{{.REPO_DIR}}"
    cmds:
      - chmod +x build-smol.sh
      - ./build-smol.sh

  build:win:
    platforms: [windows]
    desc: Build on Windows (no strip needed)
    dir: "{{.REPO_DIR}}"
    env:
      CGO_ENABLED: "0"
    cmds:
      - cmd: go build -ldflags "-s -w" -o combee.exe

  build:buxn-asm:
    platforms: [windows]
    desc: Build buxn-asm using msvc.bat and copy all bin to dotalias after build
    dir: "${USERPROFILE}/.uxntal/.buxn"
    #dir: "./.buxn"
    cmds:
      - cmd: cmd /c "call msvc.bat && msbuild buxn.sln /p:Configuration=Release /m"
      - cmd: powershell -NoProfile -Command 'Copy-Item -Path ..\\.buxn\\bin\\Release\\*.exe -Destination $env:USERPROFILE\\dotalias -Recurse -Force'

  buxn-pull:
    desc: Clone or update buxn to .buxn
    cmds:
      - cmd: powershell -NoProfile -Command 'if (Test-Path .buxn) { git -C .buxn pull --rebase } else { git clone https://github.com/bullno1/buxn.git .buxn }'


  build:drifblim-debug:
    desc: Assemble drifblim-debug.tal to drifblim-debug.rom from .drifblim/src
    dir: .drifblim/src
    cmds:
      - cmd: buxn-asm drifblim-debug.tal ../../drifblim-debug.rom