Skip to content

Commit

Permalink
Updated targets.
Browse files Browse the repository at this point in the history
  • Loading branch information
oubiwann committed Sep 3, 2021
1 parent e2a57a2 commit f218f85
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 27 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
strategy:
matrix:
goos: [darwin]
goarch: [amd64]
goarch: [x86_64]
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -41,7 +41,7 @@ jobs:
- name: Build
run: |
make
mv bin/midiserver bin/midiserver-${{ matrix.goos }}-${{ matrix.goarch }}
ls -al bin/
- name: Release macOS midiserver
uses: softprops/action-gh-release@v1
with:
Expand Down
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ VERSION = $(shell cat VERSION)
ARCH = $(shell uname -m)
OS = $(shell uname -s|tr '[:upper:]' '[:lower:]')
BIN_APP = bin/$(APP)
BIN_APP_ARCH = bin/$(APP)-$(OS)-$(ARCH)
CMD_APP = cmd/$(APP)

DVCS_HOST = github.com
Expand All @@ -27,7 +28,7 @@ MAINS = cmd/%/main.go
CMDS = $(wildcard cmd/*/main.go)
BINS = $(patsubst $(MAINS),bin/%,$(CMDS))

default: all bin/$(APP)-$(OS)-$(ARCH)
default: all $(BIN_APP_ARCH)

goversion:
@echo $(GO_VERSION)
Expand All @@ -41,8 +42,8 @@ bin/%: $(MAINS)
@echo ">> Building $@ ..."
@go build -race -ldflags "$(LDFLAGS)" -o ./$@ ./$<

bin/$(APP)-$(OS)-$(ARCH):
@mv bin/$(APP) bin/$(APP)-$(OS)-$(ARCH)
$(BIN_APP_ARCH):
@mv bin/$(APP) $(BIN_APP_ARCH)

cross-compile:
@env
Expand All @@ -52,7 +53,7 @@ cross-compile:

clean:
@echo ">> Removing $(BINS) ..."
@rm -f $(BINS) $(BIN_APP)*
@rm -f $(BINS) $(BIN_APP_ARCH)

serve: all
@echo ">> Serving from compiled binary ..."
Expand Down
36 changes: 18 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,30 +15,30 @@
$ ./bin/midiserver -h
```
```text
Usage: ./bin/midiserver [flags] [commands] [args]
Usage: ./bin/midiserver-darwin-arm64 [flags] [commands] [args]
Flags:
-d Daemonise midiserver; this disables the text parser; short-form flag
-d Daemonise midiserver; this disables the text parser; short-form flag
-daemon
Daemonise midiserver; this disables the text parser
Daemonise midiserver; this disables the text parser
-l string
Set the logging level; short-form flag (default "warn")
Set the logging level; short-form flag (default "warn")
-loglevel string
Set the logging level (default "warn")
Set the logging level (default "warn")
-p string
Set the parser to user for commands and data. Legal values are:
[exec, port, text]. Note that setting to 'text' disables
daemonisation and setting any of the other parsers automatically
enables daemonisation; short-form flag (default "text")
Set the parser to user for commands and data. Legal values are:
[exec, port, text]. Note that setting to 'text' disables
daemonisation and setting any of the other parsers automatically
enables daemonisation; short-form flag (default "text")
-parser string
Set the parser to user for commands and data. Legal values are:
[exec, port, text]. Note that setting to 'text' disables
daemonisation and setting any of the other parsers automatically
enables daemonisation (default "text")
-v Display version/build info and exit; short-form flag
Set the parser to user for commands and data. Legal values are:
[exec, port, text]. Note that setting to 'text' disables
daemonisation and setting any of the other parsers automatically
enables daemonisation (default "text")
-v Display version/build info and exit; short-form flag
-version
Display version/build info and exit
Display version/build info and exit
Commands:
Expand All @@ -48,7 +48,7 @@ Commands:
the 'list-devices' command; valid channel numbers are any of the 16
MIDI channels: 0 through 15.
list-devices
will list the MIDI devices currently recognised by the operating
Will list the MIDI devices currently recognised by the operating
system, grouped by input devices and output devices.
play-note [args]
A pitch will be played with the default values for the arguments,
Expand All @@ -59,9 +59,9 @@ Commands:
0 through 15. Pitch and velocity are standard MIDI integer values for
the same. Duration is in seconds.
ping
provided for testing purposes by Erlang Ports implementations
Provided for testing purposes by Erlang Ports implementations
version
an alternate form of the version info with concise formatting
An alternate form of the version info with concise formatting.
```

## License
Expand Down
Binary file modified bin/midiserver-darwin-arm64
Binary file not shown.
6 changes: 3 additions & 3 deletions internal/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const (
the 'list-devices' command; valid channel numbers are any of the 16
MIDI channels: 0 through 15.
list-devices
will list the MIDI devices currently recognised by the operating
Will list the MIDI devices currently recognised by the operating
system, grouped by input devices and output devices.
play-note [args]
A pitch will be played with the default values for the arguments,
Expand All @@ -32,9 +32,9 @@ const (
0 through 15. Pitch and velocity are standard MIDI integer values for
the same. Duration is in seconds.
ping
provided for testing purposes by Erlang Ports implementations
Provided for testing purposes by Erlang Ports implementations
version
an alternate form of the version info with concise formatting
An alternate form of the version info with concise formatting.
`
)
Expand Down

0 comments on commit f218f85

Please sign in to comment.