2024-03-19 13:50:13 +01:00
#export GOPATH=$(shell pwd)/GO
#export GOBIN=$(GOPATH)/bin
#export PATH=$(GOBIN):$(shell echo $${PATH})
2024-02-27 07:22:57 +01:00
2026-03-13 11:59:00 +01:00
.DEFAULT_GOAL := all
Add help target, colorize output, and improve release workflow
- Add colored terminal output support (GREEN, YELLOW, BLUE, NC)
- Introduce `help` target to document all Makefile targets
- Enhance `bump-version` to accept VERSION env var for manual version setting
- Refactor jjpush: split into modular targets (jjpush-notes, jjpush-push, jjpush-tag)
- Replace orla with aichat for AI-powered release notes generation
- Add robust JSON parsing using Python for release notes extraction
- Use stakk for PR submission (replacing raw `jj git push`)
- Generate and store release notes in temp files for tag creation
- Add installation instructions to release tags
- Update .PHONY with new targets
4.4.20: Rope-based parsing, improved release tooling, and bug fixes
### Enhancements
- **Rope-based parsing**: Added direct rope parsing for FASTA, EMBL, and FASTQ formats via `FastaChunkParserRope`, `EmblChunkParserRope`, and `FastqChunkRope` functions, eliminating unnecessary memory allocation via Pack(). Sequence extraction now supports U→T conversion and improved line ending detection.
- **Rope scanner refactoring**: Unified rope scanning logic under a new `ropeScanner`, improving maintainability and consistency across parsers.
- **Sequence handling**: Added `TakeQualities()` method to BioSequence for more efficient quality data handling.
### Bug Fixes
- **Compression behavior**: Fixed CompressStream to correctly use the `compressed` variable instead of a hardcoded boolean.
- **String splitting**: Replaced ambiguous `SplitInTwo` calls with precise `LeftSplitInTwo` or `RightSplitInTwo`, and added dedicated right-split utility.
### Tooling & Workflow Improvements
- **Makefile enhancements**: Added colored terminal output, a `help` target for documenting all targets, and improved release workflow automation.
- **Release process**: Refactored `jjpush` into modular targets (`jjpush-notes`, `jjpush-push`, `jjpush-tag`), replaced `orla` with `aichat` for AI-assisted release notes, and introduced robust JSON parsing using Python. Release notes are now generated and stored in temp files for tag creation.
- **Versioning**: `bump-version` now supports the VERSION environment variable for manual version setting.
- **Submission**: Switched from raw `jj git push` to `stakk` for PR submission.
### Internal Notes
- Installation instructions are now included in release tags.
- Fixed-size carry buffer replaced with dynamic slice for arbitrarily long line support without extra allocations.
2026-03-12 19:20:45 +01:00
GREEN := \0 33[ 0; 32m
YELLOW := \0 33[ 0; 33m
BLUE := \0 33[ 0; 34m
NC := \0 33[ 0m
2025-03-12 12:55:41 +01:00
GOFLAGS =
2022-02-24 07:26:55 +01:00
GOCMD = go
2025-03-12 12:55:41 +01:00
GOBUILD = $( GOCMD) build $( GOFLAGS)
2024-06-01 17:26:16 +02:00
GOGENERATE = $( GOCMD) generate
2022-02-24 07:26:55 +01:00
GOCLEAN = $( GOCMD) clean
GOTEST = $( GOCMD) test
GOGET = $( GOCMD) get
2022-01-14 15:21:00 +01:00
2022-02-24 07:26:55 +01:00
BUILD_DIR = build
2023-02-02 13:11:04 +01:00
OBITOOLS_PREFIX :=
2022-01-14 15:21:00 +01:00
2022-02-24 07:26:55 +01:00
PACKAGES_SRC := $( wildcard pkg/*/*.go pkg/*/*/*.go)
PACKAGE_DIRS := $( sort $( patsubst %/,%,$( dir $( PACKAGES_SRC) ) ) )
PACKAGES := $( notdir $( PACKAGE_DIRS) )
2022-01-14 15:21:00 +01:00
2025-03-08 18:56:02 +01:00
GITHOOK_SRC_DIR = git-hooks
GITHOOKS_SRC := $( wildcard $( GITHOOK_SRC_DIR) /*)
GITHOOK_DIR = .git/hooks
GITHOOKS := $( patsubst $( GITHOOK_SRC_DIR) /%,$( GITHOOK_DIR) /%,$( GITHOOKS_SRC) )
2022-02-24 07:26:55 +01:00
OBITOOLS_SRC := $( wildcard cmd/obitools/*/*.go)
OBITOOLS_DIRS := $( sort $( patsubst %/,%,$( dir $( OBITOOLS_SRC) ) ) )
OBITOOLS := $( notdir $( OBITOOLS_DIRS) )
2022-01-14 15:21:00 +01:00
2022-02-24 07:26:55 +01:00
d e f i n e M A K E _ P K G _ R U L E
2024-06-01 17:26:16 +02:00
pkg-$(notdir $(1)) : $( 1) pkg /obioptions /version .go
2022-02-24 07:26:55 +01:00
@echo -n - Building package $( notdir $( 1) ) ...
@$( GOBUILD) ./$( 1) \
2> pkg-$( notdir $( 1) ) .log \
|| cat pkg-$( notdir $( 1) ) .log
@rm -f pkg-$( notdir $( 1) ) .log
@echo Done.
e n d e f
2022-01-14 15:21:00 +01:00
2022-02-24 07:26:55 +01:00
d e f i n e M A K E _ O B I T O O L S _ R U L E
2024-06-01 17:26:16 +02:00
$(OBITOOLS_PREFIX)$(notdir $(1)) : $( BUILD_DIR ) $( 1) pkg /obioptions /version .go
2022-02-24 07:26:55 +01:00
@echo -n - Building obitool $( notdir $( 1) ) ...
@$( GOBUILD) -o $( BUILD_DIR) /$( OBITOOLS_PREFIX) $( notdir $( 1) ) ./$( 1) \
2> $( OBITOOLS_PREFIX) $( notdir $( 1) ) .log \
|| cat $( OBITOOLS_PREFIX) $( notdir $( 1) ) .log
@rm -f $( OBITOOLS_PREFIX) $( notdir $( 1) ) .log
@echo Done.
e n d e f
2022-01-14 15:21:00 +01:00
2024-06-01 17:26:16 +02:00
GIT = $( shell which git 2>& 1 >/dev/null && which git)
GITDIR = $( shell ls -d .git 2>/dev/null && echo .git || echo )
i f n e q ( $( strip $ ( GIT ) ) , )
i f n e q ( $( strip $ ( GITDIR ) ) , )
COMMIT_ID := $( shell $( GIT) log -1 HEAD --format= %h)
LAST_TAG := $( shell $( GIT) describe --tags $$ ( $( GIT) rev-list --tags --max-count= 1) | \
tr '_' ' ' )
e n d i f
e n d i f
OUTPUT := $( shell mktemp)
2022-01-14 15:21:00 +01:00
Add help target, colorize output, and improve release workflow
- Add colored terminal output support (GREEN, YELLOW, BLUE, NC)
- Introduce `help` target to document all Makefile targets
- Enhance `bump-version` to accept VERSION env var for manual version setting
- Refactor jjpush: split into modular targets (jjpush-notes, jjpush-push, jjpush-tag)
- Replace orla with aichat for AI-powered release notes generation
- Add robust JSON parsing using Python for release notes extraction
- Use stakk for PR submission (replacing raw `jj git push`)
- Generate and store release notes in temp files for tag creation
- Add installation instructions to release tags
- Update .PHONY with new targets
4.4.20: Rope-based parsing, improved release tooling, and bug fixes
### Enhancements
- **Rope-based parsing**: Added direct rope parsing for FASTA, EMBL, and FASTQ formats via `FastaChunkParserRope`, `EmblChunkParserRope`, and `FastqChunkRope` functions, eliminating unnecessary memory allocation via Pack(). Sequence extraction now supports U→T conversion and improved line ending detection.
- **Rope scanner refactoring**: Unified rope scanning logic under a new `ropeScanner`, improving maintainability and consistency across parsers.
- **Sequence handling**: Added `TakeQualities()` method to BioSequence for more efficient quality data handling.
### Bug Fixes
- **Compression behavior**: Fixed CompressStream to correctly use the `compressed` variable instead of a hardcoded boolean.
- **String splitting**: Replaced ambiguous `SplitInTwo` calls with precise `LeftSplitInTwo` or `RightSplitInTwo`, and added dedicated right-split utility.
### Tooling & Workflow Improvements
- **Makefile enhancements**: Added colored terminal output, a `help` target for documenting all targets, and improved release workflow automation.
- **Release process**: Refactored `jjpush` into modular targets (`jjpush-notes`, `jjpush-push`, `jjpush-tag`), replaced `orla` with `aichat` for AI-assisted release notes, and introduced robust JSON parsing using Python. Release notes are now generated and stored in temp files for tag creation.
- **Versioning**: `bump-version` now supports the VERSION environment variable for manual version setting.
- **Submission**: Switched from raw `jj git push` to `stakk` for PR submission.
### Internal Notes
- Installation instructions are now included in release tags.
- Fixed-size carry buffer replaced with dynamic slice for arbitrarily long line support without extra allocations.
2026-03-12 19:20:45 +01:00
help :
@printf " $( GREEN) OBITools4 Makefile $( NC) \n\n "
@printf " $( BLUE) Main targets: $( NC) \n "
@printf " %-20s %s\n" "all" "Build all obitools (default)"
@printf " %-20s %s\n" "obitools" "Build all obitools binaries to build/"
@printf " %-20s %s\n" "test" "Run Go unit tests"
@printf " %-20s %s\n" "obitests" "Run integration tests (obitests/)"
@printf " %-20s %s\n" "bump-version" "Increment patch version (or set with VERSION=x.y.z)"
@printf " %-20s %s\n" "update-deps" "Update all Go dependencies"
@printf " \n $( BLUE) Jujutsu workflow: $( NC) \n "
@printf " %-20s %s\n" "jjnew" "Document current commit and start a new one"
@printf " %-20s %s\n" "jjpush" "Release: describe, bump, generate notes, push PR, tag (VERSION=x.y.z optional)"
@printf " %-20s %s\n" "jjfetch" "Fetch latest commits from origin"
@printf " \n $( BLUE) Required tools: $( NC) \n "
@printf " %-20s " "go" ; command -v go >/dev/null 2>& 1 && printf " $( GREEN) ✓ $( NC) %s\n " " $$ (go version) " || printf " $( YELLOW) ✗ not found $( NC) \n "
@printf " %-20s " "git" ; command -v git >/dev/null 2>& 1 && printf " $( GREEN) ✓ $( NC) %s\n " " $$ (git --version) " || printf " $( YELLOW) ✗ not found $( NC) \n "
@printf " %-20s " "jj" ; command -v jj >/dev/null 2>& 1 && printf " $( GREEN) ✓ $( NC) %s\n " " $$ (jj --version) " || printf " $( YELLOW) ✗ not found $( NC) \n "
@printf " %-20s " "gh" ; command -v gh >/dev/null 2>& 1 && printf " $( GREEN) ✓ $( NC) %s\n " " $$ (gh --version | head -1) " || printf " $( YELLOW) ✗ not found $( NC) (brew install gh)\n "
@printf " \n $( BLUE) Optional tools (release notes generation): $( NC) \n "
@printf " %-20s " "aichat" ; command -v aichat >/dev/null 2>& 1 && printf " $( GREEN) ✓ $( NC) %s\n " " $$ (aichat --version) " || printf " $( YELLOW) ✗ not found $( NC) (https://github.com/sigoden/aichat)\n "
@printf " %-20s " "jq" ; command -v jq >/dev/null 2>& 1 && printf " $( GREEN) ✓ $( NC) %s\n " " $$ (jq --version) " || printf " $( YELLOW) ✗ not found $( NC) (brew install jq)\n "
2025-03-08 18:56:02 +01:00
all : install -githook obitools
2022-01-14 15:21:00 +01:00
2026-02-05 17:38:47 +01:00
obitools : $( patsubst %,$ ( OBITOOLS_PREFIX ) %,$ ( OBITOOLS ) )
2022-01-14 15:21:00 +01:00
2025-03-08 18:56:02 +01:00
install-githook : $( GITHOOKS )
2026-02-05 17:38:47 +01:00
2025-03-08 18:56:02 +01:00
$(GITHOOK_DIR)/% : $( GITHOOK_SRC_DIR ) /%
@echo installing $$ ( basename $@ ) ...
@mkdir -p $( GITHOOK_DIR)
@cp $< $@
@chmod +x $@
2023-03-21 22:02:18 +07:00
update-deps :
go get -u ./...
2025-03-08 18:56:02 +01:00
test : .FORCE
2023-08-27 17:22:51 +02:00
$( GOTEST) ./...
2025-02-19 13:17:36 +01:00
2026-02-05 17:38:47 +01:00
obitests :
2025-02-19 15:55:07 +01:00
@for t in $$ ( find obitests -name test.sh -print) ; do \
2025-03-08 16:54:24 +01:00
bash $$ { t} || exit 1; \
2026-02-05 17:38:47 +01:00
done
2025-02-19 14:37:05 +01:00
githubtests : obitools obitests
2022-05-27 11:53:29 +03:00
2022-02-24 07:26:55 +01:00
$(BUILD_DIR) :
mkdir -p $@
2022-01-14 15:21:00 +01:00
2022-02-24 07:26:55 +01:00
$( foreach P ,$ ( PACKAGE_DIRS ) ,$ ( eval $ ( call MAKE_PKG_RULE ,$ ( P ) ) ) )
2022-01-14 15:21:00 +01:00
2022-02-24 07:26:55 +01:00
$( foreach P ,$ ( OBITOOLS_DIRS ) ,$ ( eval $ ( call MAKE_OBITOOLS_RULE ,$ ( P ) ) ) )
2022-01-14 15:21:00 +01:00
2026-02-05 17:38:47 +01:00
pkg/obioptions/version.go : version .txt .FORCE
@version= $$ ( cat version.txt) ; \
cat $@ \
| sed -E 's/^var _Version = "[^"]*"/var _Version = "Release ' $$ version'"/' \
2024-06-01 17:26:16 +02:00
> $( OUTPUT)
@diff $@ $( OUTPUT) 2>& 1 > /dev/null \
2026-02-05 17:38:47 +01:00
|| ( echo " Update version.go to $$ (cat version.txt) " && mv $( OUTPUT) $@ )
2024-06-01 17:26:16 +02:00
@rm -f $( OUTPUT)
2026-02-05 17:38:47 +01:00
bump-version :
@current= $$ ( cat version.txt) ; \
Add help target, colorize output, and improve release workflow
- Add colored terminal output support (GREEN, YELLOW, BLUE, NC)
- Introduce `help` target to document all Makefile targets
- Enhance `bump-version` to accept VERSION env var for manual version setting
- Refactor jjpush: split into modular targets (jjpush-notes, jjpush-push, jjpush-tag)
- Replace orla with aichat for AI-powered release notes generation
- Add robust JSON parsing using Python for release notes extraction
- Use stakk for PR submission (replacing raw `jj git push`)
- Generate and store release notes in temp files for tag creation
- Add installation instructions to release tags
- Update .PHONY with new targets
4.4.20: Rope-based parsing, improved release tooling, and bug fixes
### Enhancements
- **Rope-based parsing**: Added direct rope parsing for FASTA, EMBL, and FASTQ formats via `FastaChunkParserRope`, `EmblChunkParserRope`, and `FastqChunkRope` functions, eliminating unnecessary memory allocation via Pack(). Sequence extraction now supports U→T conversion and improved line ending detection.
- **Rope scanner refactoring**: Unified rope scanning logic under a new `ropeScanner`, improving maintainability and consistency across parsers.
- **Sequence handling**: Added `TakeQualities()` method to BioSequence for more efficient quality data handling.
### Bug Fixes
- **Compression behavior**: Fixed CompressStream to correctly use the `compressed` variable instead of a hardcoded boolean.
- **String splitting**: Replaced ambiguous `SplitInTwo` calls with precise `LeftSplitInTwo` or `RightSplitInTwo`, and added dedicated right-split utility.
### Tooling & Workflow Improvements
- **Makefile enhancements**: Added colored terminal output, a `help` target for documenting all targets, and improved release workflow automation.
- **Release process**: Refactored `jjpush` into modular targets (`jjpush-notes`, `jjpush-push`, `jjpush-tag`), replaced `orla` with `aichat` for AI-assisted release notes, and introduced robust JSON parsing using Python. Release notes are now generated and stored in temp files for tag creation.
- **Versioning**: `bump-version` now supports the VERSION environment variable for manual version setting.
- **Submission**: Switched from raw `jj git push` to `stakk` for PR submission.
### Internal Notes
- Installation instructions are now included in release tags.
- Fixed-size carry buffer replaced with dynamic slice for arbitrarily long line support without extra allocations.
2026-03-12 19:20:45 +01:00
if [ -n " $( VERSION) " ] ; then \
new_version = " $( VERSION) " ; \
echo " Setting version to $$ new_version (was $$ current) " ; \
else \
echo "Incrementing version..." ; \
echo " Current version: $$ current " ; \
major = $$ ( echo $$ current | cut -d. -f1) ; \
minor = $$ ( echo $$ current | cut -d. -f2) ; \
patch = $$ ( echo $$ current | cut -d. -f3) ; \
new_patch = $$ ( ( patch + 1) ) ; \
new_version = " $$ major. $$ minor. $$ new_patch " ; \
echo " New version: $$ new_version " ; \
fi ; \
2026-02-05 17:38:47 +01:00
echo " $$ new_version " > version.txt
@echo "✓ Version updated in version.txt"
@$( MAKE) pkg/obioptions/version.go
2024-06-01 17:26:16 +02:00
2026-01-25 18:43:30 +01:00
jjnew :
@echo " $( YELLOW) → Creating a new commit... $( NC) "
@echo " $( BLUE) → Documenting current commit... $( NC) "
@jj auto-describe
@echo " $( BLUE) → Done. $( NC) "
@jj new
@echo " $( GREEN) ✓ New commit created $( NC) "
2026-02-05 17:38:47 +01:00
jjpush :
2026-02-20 11:52:34 +01:00
@$( MAKE) jjpush-describe
@$( MAKE) jjpush-bump
Add help target, colorize output, and improve release workflow
- Add colored terminal output support (GREEN, YELLOW, BLUE, NC)
- Introduce `help` target to document all Makefile targets
- Enhance `bump-version` to accept VERSION env var for manual version setting
- Refactor jjpush: split into modular targets (jjpush-notes, jjpush-push, jjpush-tag)
- Replace orla with aichat for AI-powered release notes generation
- Add robust JSON parsing using Python for release notes extraction
- Use stakk for PR submission (replacing raw `jj git push`)
- Generate and store release notes in temp files for tag creation
- Add installation instructions to release tags
- Update .PHONY with new targets
4.4.20: Rope-based parsing, improved release tooling, and bug fixes
### Enhancements
- **Rope-based parsing**: Added direct rope parsing for FASTA, EMBL, and FASTQ formats via `FastaChunkParserRope`, `EmblChunkParserRope`, and `FastqChunkRope` functions, eliminating unnecessary memory allocation via Pack(). Sequence extraction now supports U→T conversion and improved line ending detection.
- **Rope scanner refactoring**: Unified rope scanning logic under a new `ropeScanner`, improving maintainability and consistency across parsers.
- **Sequence handling**: Added `TakeQualities()` method to BioSequence for more efficient quality data handling.
### Bug Fixes
- **Compression behavior**: Fixed CompressStream to correctly use the `compressed` variable instead of a hardcoded boolean.
- **String splitting**: Replaced ambiguous `SplitInTwo` calls with precise `LeftSplitInTwo` or `RightSplitInTwo`, and added dedicated right-split utility.
### Tooling & Workflow Improvements
- **Makefile enhancements**: Added colored terminal output, a `help` target for documenting all targets, and improved release workflow automation.
- **Release process**: Refactored `jjpush` into modular targets (`jjpush-notes`, `jjpush-push`, `jjpush-tag`), replaced `orla` with `aichat` for AI-assisted release notes, and introduced robust JSON parsing using Python. Release notes are now generated and stored in temp files for tag creation.
- **Versioning**: `bump-version` now supports the VERSION environment variable for manual version setting.
- **Submission**: Switched from raw `jj git push` to `stakk` for PR submission.
### Internal Notes
- Installation instructions are now included in release tags.
- Fixed-size carry buffer replaced with dynamic slice for arbitrarily long line support without extra allocations.
2026-03-12 19:20:45 +01:00
@$( MAKE) jjpush-notes
2026-02-20 11:52:34 +01:00
@$( MAKE) jjpush-push
@$( MAKE) jjpush-tag
@echo " $( GREEN) ✓ Release complete $( NC) "
jjpush-describe :
2026-01-25 18:43:30 +01:00
@echo " $( BLUE) → Documenting current commit... $( NC) "
@jj auto-describe
2026-02-20 11:52:34 +01:00
jjpush-bump :
2026-02-05 17:38:47 +01:00
@echo " $( BLUE) → Creating new commit for version bump... $( NC) "
@jj new
2026-02-20 11:52:34 +01:00
@$( MAKE) bump-version
Add help target, colorize output, and improve release workflow
- Add colored terminal output support (GREEN, YELLOW, BLUE, NC)
- Introduce `help` target to document all Makefile targets
- Enhance `bump-version` to accept VERSION env var for manual version setting
- Refactor jjpush: split into modular targets (jjpush-notes, jjpush-push, jjpush-tag)
- Replace orla with aichat for AI-powered release notes generation
- Add robust JSON parsing using Python for release notes extraction
- Use stakk for PR submission (replacing raw `jj git push`)
- Generate and store release notes in temp files for tag creation
- Add installation instructions to release tags
- Update .PHONY with new targets
4.4.20: Rope-based parsing, improved release tooling, and bug fixes
### Enhancements
- **Rope-based parsing**: Added direct rope parsing for FASTA, EMBL, and FASTQ formats via `FastaChunkParserRope`, `EmblChunkParserRope`, and `FastqChunkRope` functions, eliminating unnecessary memory allocation via Pack(). Sequence extraction now supports U→T conversion and improved line ending detection.
- **Rope scanner refactoring**: Unified rope scanning logic under a new `ropeScanner`, improving maintainability and consistency across parsers.
- **Sequence handling**: Added `TakeQualities()` method to BioSequence for more efficient quality data handling.
### Bug Fixes
- **Compression behavior**: Fixed CompressStream to correctly use the `compressed` variable instead of a hardcoded boolean.
- **String splitting**: Replaced ambiguous `SplitInTwo` calls with precise `LeftSplitInTwo` or `RightSplitInTwo`, and added dedicated right-split utility.
### Tooling & Workflow Improvements
- **Makefile enhancements**: Added colored terminal output, a `help` target for documenting all targets, and improved release workflow automation.
- **Release process**: Refactored `jjpush` into modular targets (`jjpush-notes`, `jjpush-push`, `jjpush-tag`), replaced `orla` with `aichat` for AI-assisted release notes, and introduced robust JSON parsing using Python. Release notes are now generated and stored in temp files for tag creation.
- **Versioning**: `bump-version` now supports the VERSION environment variable for manual version setting.
- **Submission**: Switched from raw `jj git push` to `stakk` for PR submission.
### Internal Notes
- Installation instructions are now included in release tags.
- Fixed-size carry buffer replaced with dynamic slice for arbitrarily long line support without extra allocations.
2026-03-12 19:20:45 +01:00
jjpush-notes :
2026-02-20 11:52:34 +01:00
@version= $$ ( cat version.txt) ; \
Add help target, colorize output, and improve release workflow
- Add colored terminal output support (GREEN, YELLOW, BLUE, NC)
- Introduce `help` target to document all Makefile targets
- Enhance `bump-version` to accept VERSION env var for manual version setting
- Refactor jjpush: split into modular targets (jjpush-notes, jjpush-push, jjpush-tag)
- Replace orla with aichat for AI-powered release notes generation
- Add robust JSON parsing using Python for release notes extraction
- Use stakk for PR submission (replacing raw `jj git push`)
- Generate and store release notes in temp files for tag creation
- Add installation instructions to release tags
- Update .PHONY with new targets
4.4.20: Rope-based parsing, improved release tooling, and bug fixes
### Enhancements
- **Rope-based parsing**: Added direct rope parsing for FASTA, EMBL, and FASTQ formats via `FastaChunkParserRope`, `EmblChunkParserRope`, and `FastqChunkRope` functions, eliminating unnecessary memory allocation via Pack(). Sequence extraction now supports U→T conversion and improved line ending detection.
- **Rope scanner refactoring**: Unified rope scanning logic under a new `ropeScanner`, improving maintainability and consistency across parsers.
- **Sequence handling**: Added `TakeQualities()` method to BioSequence for more efficient quality data handling.
### Bug Fixes
- **Compression behavior**: Fixed CompressStream to correctly use the `compressed` variable instead of a hardcoded boolean.
- **String splitting**: Replaced ambiguous `SplitInTwo` calls with precise `LeftSplitInTwo` or `RightSplitInTwo`, and added dedicated right-split utility.
### Tooling & Workflow Improvements
- **Makefile enhancements**: Added colored terminal output, a `help` target for documenting all targets, and improved release workflow automation.
- **Release process**: Refactored `jjpush` into modular targets (`jjpush-notes`, `jjpush-push`, `jjpush-tag`), replaced `orla` with `aichat` for AI-assisted release notes, and introduced robust JSON parsing using Python. Release notes are now generated and stored in temp files for tag creation.
- **Versioning**: `bump-version` now supports the VERSION environment variable for manual version setting.
- **Submission**: Switched from raw `jj git push` to `stakk` for PR submission.
### Internal Notes
- Installation instructions are now included in release tags.
- Fixed-size carry buffer replaced with dynamic slice for arbitrarily long line support without extra allocations.
2026-03-12 19:20:45 +01:00
echo " $( BLUE) → Generating release notes for version $$ version... $( NC) " ; \
release_title = " Release $$ version " ; \
release_body = "" ; \
if command -v aichat >/dev/null 2>& 1; then \
previous_tag = $$ ( git describe --tags --abbrev= 0 --match 'Release_*' 2>/dev/null) ; \
2026-02-20 11:52:34 +01:00
if [ -z " $$ previous_tag " ] ; then \
echo " $( YELLOW) ⚠ No previous Release tag found, skipping release notes $( NC) " ; \
2026-02-09 09:05:47 +01:00
else \
2026-02-20 11:52:34 +01:00
raw_output = $$ ( git log --format= "%h %B" " $$ previous_tag..HEAD " | \
Add help target, colorize output, and improve release workflow
- Add colored terminal output support (GREEN, YELLOW, BLUE, NC)
- Introduce `help` target to document all Makefile targets
- Enhance `bump-version` to accept VERSION env var for manual version setting
- Refactor jjpush: split into modular targets (jjpush-notes, jjpush-push, jjpush-tag)
- Replace orla with aichat for AI-powered release notes generation
- Add robust JSON parsing using Python for release notes extraction
- Use stakk for PR submission (replacing raw `jj git push`)
- Generate and store release notes in temp files for tag creation
- Add installation instructions to release tags
- Update .PHONY with new targets
4.4.20: Rope-based parsing, improved release tooling, and bug fixes
### Enhancements
- **Rope-based parsing**: Added direct rope parsing for FASTA, EMBL, and FASTQ formats via `FastaChunkParserRope`, `EmblChunkParserRope`, and `FastqChunkRope` functions, eliminating unnecessary memory allocation via Pack(). Sequence extraction now supports U→T conversion and improved line ending detection.
- **Rope scanner refactoring**: Unified rope scanning logic under a new `ropeScanner`, improving maintainability and consistency across parsers.
- **Sequence handling**: Added `TakeQualities()` method to BioSequence for more efficient quality data handling.
### Bug Fixes
- **Compression behavior**: Fixed CompressStream to correctly use the `compressed` variable instead of a hardcoded boolean.
- **String splitting**: Replaced ambiguous `SplitInTwo` calls with precise `LeftSplitInTwo` or `RightSplitInTwo`, and added dedicated right-split utility.
### Tooling & Workflow Improvements
- **Makefile enhancements**: Added colored terminal output, a `help` target for documenting all targets, and improved release workflow automation.
- **Release process**: Refactored `jjpush` into modular targets (`jjpush-notes`, `jjpush-push`, `jjpush-tag`), replaced `orla` with `aichat` for AI-assisted release notes, and introduced robust JSON parsing using Python. Release notes are now generated and stored in temp files for tag creation.
- **Versioning**: `bump-version` now supports the VERSION environment variable for manual version setting.
- **Submission**: Switched from raw `jj git push` to `stakk` for PR submission.
### Internal Notes
- Installation instructions are now included in release tags.
- Fixed-size carry buffer replaced with dynamic slice for arbitrarily long line support without extra allocations.
2026-03-12 19:20:45 +01:00
aichat \
2026-02-20 11:52:34 +01:00
" Summarize the following commits into a GitHub release note for version $$ version. Ignore commits related to version bumps, .gitignore changes, or any internal housekeeping that is irrelevant to end users. Describe each user-facing change precisely without exposing code. Eliminate redundancy. Output strictly valid JSON with no surrounding text, using this exact schema: {\"title\": \"<short release title>\", \"body\": \"<detailed markdown release notes>\"} " 2>/dev/null) || true; \
if [ -n " $$ raw_output " ] ; then \
Add help target, colorize output, and improve release workflow
- Add colored terminal output support (GREEN, YELLOW, BLUE, NC)
- Introduce `help` target to document all Makefile targets
- Enhance `bump-version` to accept VERSION env var for manual version setting
- Refactor jjpush: split into modular targets (jjpush-notes, jjpush-push, jjpush-tag)
- Replace orla with aichat for AI-powered release notes generation
- Add robust JSON parsing using Python for release notes extraction
- Use stakk for PR submission (replacing raw `jj git push`)
- Generate and store release notes in temp files for tag creation
- Add installation instructions to release tags
- Update .PHONY with new targets
4.4.20: Rope-based parsing, improved release tooling, and bug fixes
### Enhancements
- **Rope-based parsing**: Added direct rope parsing for FASTA, EMBL, and FASTQ formats via `FastaChunkParserRope`, `EmblChunkParserRope`, and `FastqChunkRope` functions, eliminating unnecessary memory allocation via Pack(). Sequence extraction now supports U→T conversion and improved line ending detection.
- **Rope scanner refactoring**: Unified rope scanning logic under a new `ropeScanner`, improving maintainability and consistency across parsers.
- **Sequence handling**: Added `TakeQualities()` method to BioSequence for more efficient quality data handling.
### Bug Fixes
- **Compression behavior**: Fixed CompressStream to correctly use the `compressed` variable instead of a hardcoded boolean.
- **String splitting**: Replaced ambiguous `SplitInTwo` calls with precise `LeftSplitInTwo` or `RightSplitInTwo`, and added dedicated right-split utility.
### Tooling & Workflow Improvements
- **Makefile enhancements**: Added colored terminal output, a `help` target for documenting all targets, and improved release workflow automation.
- **Release process**: Refactored `jjpush` into modular targets (`jjpush-notes`, `jjpush-push`, `jjpush-tag`), replaced `orla` with `aichat` for AI-assisted release notes, and introduced robust JSON parsing using Python. Release notes are now generated and stored in temp files for tag creation.
- **Versioning**: `bump-version` now supports the VERSION environment variable for manual version setting.
- **Submission**: Switched from raw `jj git push` to `stakk` for PR submission.
### Internal Notes
- Installation instructions are now included in release tags.
- Fixed-size carry buffer replaced with dynamic slice for arbitrarily long line support without extra allocations.
2026-03-12 19:20:45 +01:00
notes = $$ ( printf '%s\n' " $$ raw_output " | python3 tools/json2md.py 2>/dev/null) ; \
if [ -n " $$ notes " ] ; then \
release_title = $$ ( echo " $$ notes " | head -1) ; \
release_body = $$ ( echo " $$ notes " | tail -n +3) ; \
2026-02-20 11:52:34 +01:00
else \
echo " $( YELLOW) ⚠ JSON parsing failed, using default release message $( NC) " ; \
fi ; \
fi ; \
2026-02-09 09:05:47 +01:00
fi ; \
2026-02-07 11:48:18 +01:00
fi ; \
Add help target, colorize output, and improve release workflow
- Add colored terminal output support (GREEN, YELLOW, BLUE, NC)
- Introduce `help` target to document all Makefile targets
- Enhance `bump-version` to accept VERSION env var for manual version setting
- Refactor jjpush: split into modular targets (jjpush-notes, jjpush-push, jjpush-tag)
- Replace orla with aichat for AI-powered release notes generation
- Add robust JSON parsing using Python for release notes extraction
- Use stakk for PR submission (replacing raw `jj git push`)
- Generate and store release notes in temp files for tag creation
- Add installation instructions to release tags
- Update .PHONY with new targets
4.4.20: Rope-based parsing, improved release tooling, and bug fixes
### Enhancements
- **Rope-based parsing**: Added direct rope parsing for FASTA, EMBL, and FASTQ formats via `FastaChunkParserRope`, `EmblChunkParserRope`, and `FastqChunkRope` functions, eliminating unnecessary memory allocation via Pack(). Sequence extraction now supports U→T conversion and improved line ending detection.
- **Rope scanner refactoring**: Unified rope scanning logic under a new `ropeScanner`, improving maintainability and consistency across parsers.
- **Sequence handling**: Added `TakeQualities()` method to BioSequence for more efficient quality data handling.
### Bug Fixes
- **Compression behavior**: Fixed CompressStream to correctly use the `compressed` variable instead of a hardcoded boolean.
- **String splitting**: Replaced ambiguous `SplitInTwo` calls with precise `LeftSplitInTwo` or `RightSplitInTwo`, and added dedicated right-split utility.
### Tooling & Workflow Improvements
- **Makefile enhancements**: Added colored terminal output, a `help` target for documenting all targets, and improved release workflow automation.
- **Release process**: Refactored `jjpush` into modular targets (`jjpush-notes`, `jjpush-push`, `jjpush-tag`), replaced `orla` with `aichat` for AI-assisted release notes, and introduced robust JSON parsing using Python. Release notes are now generated and stored in temp files for tag creation.
- **Versioning**: `bump-version` now supports the VERSION environment variable for manual version setting.
- **Submission**: Switched from raw `jj git push` to `stakk` for PR submission.
### Internal Notes
- Installation instructions are now included in release tags.
- Fixed-size carry buffer replaced with dynamic slice for arbitrarily long line support without extra allocations.
2026-03-12 19:20:45 +01:00
printf '%s' " $$ release_title " > /tmp/obitools4-release-title.txt; \
printf '%s' " $$ release_body " > /tmp/obitools4-release-body.txt; \
echo " $( BLUE) → Setting release notes as commit description... $( NC) " ; \
jj desc -m " $$ release_title " $$ '\n\n' " $$ release_body "
jjpush-push :
@echo " $( BLUE) → Pushing commits... $( NC) "
@jj git push --change @
@echo " $( BLUE) → Creating/updating PR... $( NC) "
@release_title= $$ ( cat /tmp/obitools4-release-title.txt 2>/dev/null || echo " Release $$ (cat version.txt) " ) ; \
release_body = $$ ( cat /tmp/obitools4-release-body.txt 2>/dev/null || echo "" ) ; \
branch = $$ ( jj log -r @ --no-graph -T 'bookmarks.map(|b| b.name()).join("\n")' 2>/dev/null | head -1) ; \
if [ -n " $$ branch " ] && command -v gh >/dev/null 2>& 1; then \
gh pr create --title " $$ release_title " --body " $$ release_body " --base master --head " $$ branch " 2>/dev/null \
|| gh pr edit " $$ branch " --title " $$ release_title " --body " $$ release_body " 2>/dev/null \
|| echo " $( YELLOW) ⚠ Could not create/update PR $( NC) " ; \
fi
jjpush-tag :
@version= $$ ( cat version.txt) ; \
tag_name = " Release_ $$ version " ; \
release_title = $$ ( cat /tmp/obitools4-release-title.txt 2>/dev/null || echo " Release $$ version " ) ; \
release_body = $$ ( cat /tmp/obitools4-release-body.txt 2>/dev/null || echo "" ) ; \
2026-02-20 11:52:34 +01:00
install_section = $$ '\n## Installation\n\n### Pre-built binaries\n\nDownload the appropriate archive for your system from the\n[release assets](https://github.com/metabarcoding/obitools4/releases/tag/Release_' " $$ version " ')\nand extract it:\n\n#### Linux (AMD64)\n```bash\ntar -xzf obitools4_' " $$ version " '_linux_amd64.tar.gz\n```\n\n#### Linux (ARM64)\n```bash\ntar -xzf obitools4_' " $$ version " '_linux_arm64.tar.gz\n```\n\n#### macOS (Intel)\n```bash\ntar -xzf obitools4_' " $$ version " '_darwin_amd64.tar.gz\n```\n\n#### macOS (Apple Silicon)\n```bash\ntar -xzf obitools4_' " $$ version " '_darwin_arm64.tar.gz\n```\n\nAll OBITools4 binaries are included in each archive.\n\n### From source\n\nYou can also compile and install OBITools4 directly from source using the\ninstallation script:\n\n```bash\ncurl -L https://raw.githubusercontent.com/metabarcoding/obitools4/master/install_obitools.sh | bash -s -- --version ' " $$ version " '\n```\n\nBy default binaries are installed in `/usr/local/bin`. Use `--install-dir` to\nchange the destination and `--obitools-prefix` to add a prefix to command names:\n\n```bash\ncurl -L https://raw.githubusercontent.com/metabarcoding/obitools4/master/install_obitools.sh | \\\n bash -s -- --version ' " $$ version " ' --install-dir ~/local --obitools-prefix k\n```\n' ; \
Add help target, colorize output, and improve release workflow
- Add colored terminal output support (GREEN, YELLOW, BLUE, NC)
- Introduce `help` target to document all Makefile targets
- Enhance `bump-version` to accept VERSION env var for manual version setting
- Refactor jjpush: split into modular targets (jjpush-notes, jjpush-push, jjpush-tag)
- Replace orla with aichat for AI-powered release notes generation
- Add robust JSON parsing using Python for release notes extraction
- Use stakk for PR submission (replacing raw `jj git push`)
- Generate and store release notes in temp files for tag creation
- Add installation instructions to release tags
- Update .PHONY with new targets
4.4.20: Rope-based parsing, improved release tooling, and bug fixes
### Enhancements
- **Rope-based parsing**: Added direct rope parsing for FASTA, EMBL, and FASTQ formats via `FastaChunkParserRope`, `EmblChunkParserRope`, and `FastqChunkRope` functions, eliminating unnecessary memory allocation via Pack(). Sequence extraction now supports U→T conversion and improved line ending detection.
- **Rope scanner refactoring**: Unified rope scanning logic under a new `ropeScanner`, improving maintainability and consistency across parsers.
- **Sequence handling**: Added `TakeQualities()` method to BioSequence for more efficient quality data handling.
### Bug Fixes
- **Compression behavior**: Fixed CompressStream to correctly use the `compressed` variable instead of a hardcoded boolean.
- **String splitting**: Replaced ambiguous `SplitInTwo` calls with precise `LeftSplitInTwo` or `RightSplitInTwo`, and added dedicated right-split utility.
### Tooling & Workflow Improvements
- **Makefile enhancements**: Added colored terminal output, a `help` target for documenting all targets, and improved release workflow automation.
- **Release process**: Refactored `jjpush` into modular targets (`jjpush-notes`, `jjpush-push`, `jjpush-tag`), replaced `orla` with `aichat` for AI-assisted release notes, and introduced robust JSON parsing using Python. Release notes are now generated and stored in temp files for tag creation.
- **Versioning**: `bump-version` now supports the VERSION environment variable for manual version setting.
- **Submission**: Switched from raw `jj git push` to `stakk` for PR submission.
### Internal Notes
- Installation instructions are now included in release tags.
- Fixed-size carry buffer replaced with dynamic slice for arbitrarily long line support without extra allocations.
2026-03-12 19:20:45 +01:00
release_message = " $$ release_title " $$ '\n\n' " $$ release_body $$ install_section " ; \
2026-02-20 11:52:34 +01:00
echo " $( BLUE) → Creating tag $$ tag_name... $( NC) " ; \
git tag -a " $$ tag_name " -m " $$ release_message " 2>/dev/null || echo " $( YELLOW) ⚠ Tag $$ tag_name already exists $( NC) " ; \
echo " $( BLUE) → Pushing tag $$ tag_name... $( NC) " ; \
Add help target, colorize output, and improve release workflow
- Add colored terminal output support (GREEN, YELLOW, BLUE, NC)
- Introduce `help` target to document all Makefile targets
- Enhance `bump-version` to accept VERSION env var for manual version setting
- Refactor jjpush: split into modular targets (jjpush-notes, jjpush-push, jjpush-tag)
- Replace orla with aichat for AI-powered release notes generation
- Add robust JSON parsing using Python for release notes extraction
- Use stakk for PR submission (replacing raw `jj git push`)
- Generate and store release notes in temp files for tag creation
- Add installation instructions to release tags
- Update .PHONY with new targets
4.4.20: Rope-based parsing, improved release tooling, and bug fixes
### Enhancements
- **Rope-based parsing**: Added direct rope parsing for FASTA, EMBL, and FASTQ formats via `FastaChunkParserRope`, `EmblChunkParserRope`, and `FastqChunkRope` functions, eliminating unnecessary memory allocation via Pack(). Sequence extraction now supports U→T conversion and improved line ending detection.
- **Rope scanner refactoring**: Unified rope scanning logic under a new `ropeScanner`, improving maintainability and consistency across parsers.
- **Sequence handling**: Added `TakeQualities()` method to BioSequence for more efficient quality data handling.
### Bug Fixes
- **Compression behavior**: Fixed CompressStream to correctly use the `compressed` variable instead of a hardcoded boolean.
- **String splitting**: Replaced ambiguous `SplitInTwo` calls with precise `LeftSplitInTwo` or `RightSplitInTwo`, and added dedicated right-split utility.
### Tooling & Workflow Improvements
- **Makefile enhancements**: Added colored terminal output, a `help` target for documenting all targets, and improved release workflow automation.
- **Release process**: Refactored `jjpush` into modular targets (`jjpush-notes`, `jjpush-push`, `jjpush-tag`), replaced `orla` with `aichat` for AI-assisted release notes, and introduced robust JSON parsing using Python. Release notes are now generated and stored in temp files for tag creation.
- **Versioning**: `bump-version` now supports the VERSION environment variable for manual version setting.
- **Submission**: Switched from raw `jj git push` to `stakk` for PR submission.
### Internal Notes
- Installation instructions are now included in release tags.
- Fixed-size carry buffer replaced with dynamic slice for arbitrarily long line support without extra allocations.
2026-03-12 19:20:45 +01:00
git push origin " $$ tag_name " 2>/dev/null || echo " $( YELLOW) ⚠ Tag push failed or already pushed $( NC) " ; \
rm -f /tmp/obitools4-release-title.txt /tmp/obitools4-release-body.txt
2026-01-25 18:43:30 +01:00
jjfetch :
@echo " $( YELLOW) → Pulling latest commits... $( NC) "
@jj git fetch
@jj new master@origin
@echo " $( GREEN) ✓ Latest commits pulled $( NC) "
Add help target, colorize output, and improve release workflow
- Add colored terminal output support (GREEN, YELLOW, BLUE, NC)
- Introduce `help` target to document all Makefile targets
- Enhance `bump-version` to accept VERSION env var for manual version setting
- Refactor jjpush: split into modular targets (jjpush-notes, jjpush-push, jjpush-tag)
- Replace orla with aichat for AI-powered release notes generation
- Add robust JSON parsing using Python for release notes extraction
- Use stakk for PR submission (replacing raw `jj git push`)
- Generate and store release notes in temp files for tag creation
- Add installation instructions to release tags
- Update .PHONY with new targets
4.4.20: Rope-based parsing, improved release tooling, and bug fixes
### Enhancements
- **Rope-based parsing**: Added direct rope parsing for FASTA, EMBL, and FASTQ formats via `FastaChunkParserRope`, `EmblChunkParserRope`, and `FastqChunkRope` functions, eliminating unnecessary memory allocation via Pack(). Sequence extraction now supports U→T conversion and improved line ending detection.
- **Rope scanner refactoring**: Unified rope scanning logic under a new `ropeScanner`, improving maintainability and consistency across parsers.
- **Sequence handling**: Added `TakeQualities()` method to BioSequence for more efficient quality data handling.
### Bug Fixes
- **Compression behavior**: Fixed CompressStream to correctly use the `compressed` variable instead of a hardcoded boolean.
- **String splitting**: Replaced ambiguous `SplitInTwo` calls with precise `LeftSplitInTwo` or `RightSplitInTwo`, and added dedicated right-split utility.
### Tooling & Workflow Improvements
- **Makefile enhancements**: Added colored terminal output, a `help` target for documenting all targets, and improved release workflow automation.
- **Release process**: Refactored `jjpush` into modular targets (`jjpush-notes`, `jjpush-push`, `jjpush-tag`), replaced `orla` with `aichat` for AI-assisted release notes, and introduced robust JSON parsing using Python. Release notes are now generated and stored in temp files for tag creation.
- **Versioning**: `bump-version` now supports the VERSION environment variable for manual version setting.
- **Submission**: Switched from raw `jj git push` to `stakk` for PR submission.
### Internal Notes
- Installation instructions are now included in release tags.
- Fixed-size carry buffer replaced with dynamic slice for arbitrarily long line support without extra allocations.
2026-03-12 19:20:45 +01:00
.PHONY : all obitools update -deps obitests githubtests help jjnew jjpush jjpush -describe jjpush -bump jjpush -notes jjpush -push jjpush -tag jjfetch bump -version .FORCE
2026-02-05 17:38:47 +01:00
.FORCE :