mirror of
https://github.com/onyx-and-iris/xair-cli.git
synced 2026-03-03 10:39:12 +00:00
Compare commits
No commits in common. "886c078f673ec28208be831cab52f15de765903e" and "23422f9641a1061e5f78a32afc6337343b65e1de" have entirely different histories.
886c078f67
...
23422f9641
@ -1,22 +1,23 @@
|
|||||||
version: '3'
|
version: '3'
|
||||||
|
|
||||||
vars:
|
vars:
|
||||||
WINDOWS: '{{.BIN_DIR}}/{{.PROGRAM}}_windows_amd64.exe'
|
BIN_X32: x32-cli
|
||||||
LINUX: '{{.BIN_DIR}}/{{.PROGRAM}}_linux_amd64'
|
|
||||||
MACOS: '{{.BIN_DIR}}/{{.PROGRAM}}_darwin_amd64'
|
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
windows-amd64:
|
windows-amd64:
|
||||||
desc: Build the x32-cli project for Windows
|
desc: Build the x32-cli project for Windows
|
||||||
cmds:
|
cmds:
|
||||||
- GOOS=windows GOARCH=amd64 go build -o {{.WINDOWS}} -ldflags="-X main.version={{.VERSION}}" ./cmd/{{.PROGRAM}}
|
- GOOS=windows GOARCH=amd64 go build -o {{.BIN_DIR}}/{{.BIN_X32}}_windows_amd64.exe -ldflags="-X main.version={{.VERSION}}" ./cmd/{{.BIN_X32}}
|
||||||
|
internal: true
|
||||||
|
|
||||||
linux-amd64:
|
linux-amd64:
|
||||||
desc: Build the x32-cli project for Linux
|
desc: Build the x32-cli project for Linux
|
||||||
cmds:
|
cmds:
|
||||||
- GOOS=linux GOARCH=amd64 go build -o {{.LINUX}} -ldflags="-X main.version={{.VERSION}}" ./cmd/{{.PROGRAM}}
|
- GOOS=linux GOARCH=amd64 go build -o {{.BIN_DIR}}/{{.BIN_X32}}_linux_amd64 -ldflags="-X main.version={{.VERSION}}" ./cmd/{{.BIN_X32}}
|
||||||
|
internal: true
|
||||||
|
|
||||||
darwin-amd64:
|
darwin-amd64:
|
||||||
desc: Build the x32-cli project for macOS
|
desc: Build the x32-cli project for macOS
|
||||||
cmds:
|
cmds:
|
||||||
- GOOS=darwin GOARCH=amd64 go build -o {{.MACOS}} -ldflags="-X main.version={{.VERSION}}" ./cmd/{{.PROGRAM}}
|
- GOOS=darwin GOARCH=amd64 go build -o {{.BIN_DIR}}/{{.BIN_X32}}_darwin_amd64 -ldflags="-X main.version={{.VERSION}}" ./cmd/{{.BIN_X32}}
|
||||||
|
internal: true
|
||||||
|
|||||||
@ -1,22 +1,23 @@
|
|||||||
version: '3'
|
version: '3'
|
||||||
|
|
||||||
vars:
|
vars:
|
||||||
WINDOWS: '{{.BIN_DIR}}/{{.PROGRAM}}_windows_amd64.exe'
|
BIN_XAIR: xair-cli
|
||||||
LINUX: '{{.BIN_DIR}}/{{.PROGRAM}}_linux_amd64'
|
|
||||||
MACOS: '{{.BIN_DIR}}/{{.PROGRAM}}_darwin_amd64'
|
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
windows-amd64:
|
windows-amd64:
|
||||||
desc: Build the xair-cli project for Windows
|
desc: Build the xair-cli project for Windows
|
||||||
cmds:
|
cmds:
|
||||||
- GOOS=windows GOARCH=amd64 go build -o {{.WINDOWS}} -ldflags="-X main.version={{.VERSION}}" ./cmd/{{.PROGRAM}}
|
- GOOS=windows GOARCH=amd64 go build -o {{.BIN_DIR}}/{{.BIN_XAIR}}_windows_amd64.exe -ldflags="-X main.version={{.VERSION}}" ./cmd/{{.BIN_XAIR}}
|
||||||
|
internal: true
|
||||||
|
|
||||||
linux-amd64:
|
linux-amd64:
|
||||||
desc: Build the xair-cli project for Linux
|
desc: Build the xair-cli project for Linux
|
||||||
cmds:
|
cmds:
|
||||||
- GOOS=linux GOARCH=amd64 go build -o {{.LINUX}} -ldflags="-X main.version={{.VERSION}}" ./cmd/{{.PROGRAM}}
|
- GOOS=linux GOARCH=amd64 go build -o {{.BIN_DIR}}/{{.BIN_XAIR}}_linux_amd64 -ldflags="-X main.version={{.VERSION}}" ./cmd/{{.BIN_XAIR}}
|
||||||
|
internal: true
|
||||||
|
|
||||||
darwin-amd64:
|
darwin-amd64:
|
||||||
desc: Build the xair-cli project for macOS
|
desc: Build the xair-cli project for macOS
|
||||||
cmds:
|
cmds:
|
||||||
- GOOS=darwin GOARCH=amd64 go build -o {{.MACOS}} -ldflags="-X main.version={{.VERSION}}" ./cmd/{{.PROGRAM}}
|
- GOOS=darwin GOARCH=amd64 go build -o {{.BIN_DIR}}/{{.BIN_XAIR}}_darwin_amd64 -ldflags="-X main.version={{.VERSION}}" ./cmd/{{.BIN_XAIR}}
|
||||||
|
internal: true
|
||||||
|
|||||||
24
Taskfile.yml
24
Taskfile.yml
@ -1,16 +1,8 @@
|
|||||||
version: '3'
|
version: '3'
|
||||||
|
|
||||||
includes:
|
includes:
|
||||||
build-xair:
|
build-xair: ./Taskfile.build-xair.yml
|
||||||
taskfile: ./Taskfile.build-xair.yml
|
build-x32: ./Taskfile.build-x32.yml
|
||||||
internal: true
|
|
||||||
vars:
|
|
||||||
PROGRAM: xair-cli
|
|
||||||
build-x32:
|
|
||||||
taskfile: ./Taskfile.build-x32.yml
|
|
||||||
internal: true
|
|
||||||
vars:
|
|
||||||
PROGRAM: x32-cli
|
|
||||||
|
|
||||||
vars:
|
vars:
|
||||||
SHELL: '{{if eq .OS "Windows_NT"}}powershell{{end}}'
|
SHELL: '{{if eq .OS "Windows_NT"}}powershell{{end}}'
|
||||||
@ -28,11 +20,13 @@ tasks:
|
|||||||
desc: Build the xair-cli and x32-cli projects for all platforms
|
desc: Build the xair-cli and x32-cli projects for all platforms
|
||||||
deps: [vet]
|
deps: [vet]
|
||||||
cmds:
|
cmds:
|
||||||
- for:
|
- task: build-xair:windows-amd64
|
||||||
matrix:
|
- task: build-xair:linux-amd64
|
||||||
PROGRAM: ['build-xair', 'build-x32']
|
- task: build-xair:darwin-amd64
|
||||||
TARGET: ['windows-amd64', 'linux-amd64', 'darwin-amd64']
|
|
||||||
task: '{{.ITEM.PROGRAM}}:{{.ITEM.TARGET}}'
|
- task: build-x32:windows-amd64
|
||||||
|
- task: build-x32:linux-amd64
|
||||||
|
- task: build-x32:darwin-amd64
|
||||||
|
|
||||||
vet:
|
vet:
|
||||||
desc: Vet the code
|
desc: Vet the code
|
||||||
|
|||||||
@ -126,7 +126,7 @@ func (s *Strip) SetColor(strip int, color int32) error {
|
|||||||
return s.client.SendMessage(address, color)
|
return s.client.SendMessage(address, color)
|
||||||
}
|
}
|
||||||
|
|
||||||
// SendLevel requests the sends level for a mixbus.
|
// Sends requests the sends level for a mixbus.
|
||||||
func (s *Strip) SendLevel(strip int, bus int) (float64, error) {
|
func (s *Strip) SendLevel(strip int, bus int) (float64, error) {
|
||||||
address := fmt.Sprintf(s.baseAddress, strip) + fmt.Sprintf("/mix/%02d/level", bus)
|
address := fmt.Sprintf(s.baseAddress, strip) + fmt.Sprintf("/mix/%02d/level", bus)
|
||||||
err := s.client.SendMessage(address)
|
err := s.client.SendMessage(address)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user