Skip to content

Commit

Permalink
Add Makefiles
Browse files Browse the repository at this point in the history
  • Loading branch information
ohler55 committed Apr 11, 2024
1 parent 0358624 commit cd7c825
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm

The structure and content of this file follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [1.21.5] - 2024-04-11
### Added
- Makefiles

## [1.21.4] - 2024-02-29
### Fixed
- Fixed regexp parsing to allow regexp escape sequences.
Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,7 @@ cover: lint

test: cover

.PHONY: all lint cover test
build:
make -C cmd

.PHONY: all lint cover test build
5 changes: 5 additions & 0 deletions cmd/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

build:
make -C oj

.PHONY: all build
9 changes: 9 additions & 0 deletions cmd/oj/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

VERSION = $(shell git describe --tags --always --dirty)

LDFLAG = "-s -w -X main.version=$(VERSION)"

build:
go build -ldflags $(LDFLAG) .

.PHONY: build
2 changes: 1 addition & 1 deletion cmd/oj/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"github.com/ohler55/ojg/sen"
)

const version = "1.19.4"
var version = "unknown"

var (
indent = 2
Expand Down

0 comments on commit cd7c825

Please sign in to comment.