-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add version support and release configuration
- Loading branch information
1 parent
ffef3c6
commit a156a2b
Showing
12 changed files
with
690 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
goreleaser: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.20' | ||
|
||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v4 | ||
with: | ||
version: latest | ||
args: release --clean | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
version: 2 | ||
|
||
before: | ||
hooks: | ||
- go mod tidy | ||
|
||
builds: | ||
- id: memex | ||
main: ./cmd/memex | ||
binary: memex | ||
goos: | ||
- linux | ||
- darwin | ||
- windows | ||
goarch: | ||
- amd64 | ||
- arm64 | ||
env: | ||
- CGO_ENABLED=0 | ||
ldflags: | ||
- -s -w -X main.version={{.Version}} | ||
|
||
- id: memexd | ||
main: ./cmd/memexd | ||
binary: memexd | ||
goos: | ||
- linux | ||
- darwin | ||
- windows | ||
goarch: | ||
- amd64 | ||
- arm64 | ||
env: | ||
- CGO_ENABLED=0 | ||
ldflags: | ||
- -s -w -X main.version={{.Version}} | ||
|
||
archives: | ||
- id: memex-archive | ||
builds: | ||
- memex | ||
- memexd | ||
name_template: >- | ||
{{ .ProjectName }}_ | ||
{{- title .Os }}_ | ||
{{- if eq .Arch "amd64" }}x86_64 | ||
{{- else if eq .Arch "386" }}i386 | ||
{{- else }}{{ .Arch }}{{ end }} | ||
format_overrides: | ||
- goos: windows | ||
format: zip | ||
files: | ||
- README.md | ||
- LICENSE | ||
- docs/* | ||
|
||
checksum: | ||
name_template: 'checksums.txt' | ||
|
||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- '^docs:' | ||
- '^test:' | ||
- '^ci:' | ||
- Merge pull request | ||
- Merge branch | ||
|
||
brews: | ||
- repository: | ||
owner: systemshift | ||
name: homebrew-memex | ||
homepage: "https://github.com/systemshift/memex" | ||
description: "Graph-oriented data management tool" | ||
install: | | ||
bin.install "memex" | ||
bin.install "memexd" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# Version Compatibility Guide | ||
|
||
Memex uses semantic versioning for both the application and repository format to ensure safe upgrades and compatibility. | ||
|
||
## Version Types | ||
|
||
### Application Version | ||
- The version of the memex binaries (e.g., 1.2.3) | ||
- Follows semantic versioning (MAJOR.MINOR.PATCH) | ||
- Displayed with `memex --version` | ||
|
||
### Repository Format Version | ||
- The version of the .mx file format (e.g., 1.0) | ||
- Uses MAJOR.MINOR format | ||
- Stored in repository header | ||
- Checked when opening repositories | ||
|
||
## Compatibility Rules | ||
|
||
When opening a repository, Memex checks: | ||
1. Repository format version compatibility | ||
2. Records which version of memex created the repository | ||
|
||
Version compatibility rules: | ||
- Major version must match exactly (e.g., 1.x can't open 2.x repositories) | ||
- Minor version of the repository must be <= current version | ||
- The version that created a repository is stored in its header | ||
|
||
## Version Information | ||
|
||
Use `memex version` to check: | ||
- Current memex version | ||
- Repository format version | ||
- Which memex version created the repository | ||
|
||
Example output: | ||
``` | ||
Memex Version: 1.2.3 | ||
Commit: abc123 | ||
Build Date: 2024-01-01 | ||
Repository Format Version: 1.0 | ||
Created by Memex Version: 1.2.0 | ||
``` | ||
|
||
## Version History | ||
|
||
### Repository Format Versions | ||
|
||
- 1.0: Initial stable format | ||
- Content-addressable storage | ||
- DAG structure | ||
- Transaction log | ||
- Basic metadata | ||
|
||
Future versions will maintain backward compatibility within the same major version. | ||
|
||
## Upgrading Repositories | ||
|
||
When a new version of Memex is released: | ||
|
||
1. If only PATCH version changes: | ||
- No action needed | ||
- Full compatibility maintained | ||
|
||
2. If MINOR version changes: | ||
- Repository format is compatible | ||
- New features may be available | ||
- No migration needed | ||
|
||
3. If MAJOR version changes: | ||
- Repository format may be incompatible | ||
- Migration tool will be provided | ||
- Check release notes for upgrade path |
Oops, something went wrong.