Skip to content

Commit

Permalink
Version v1.0 (#102)
Browse files Browse the repository at this point in the history
* rm goreleaser action.

* reference link.

* removed redundant code, text and names.

* typo fixes.

* readme tweaks.

* arm and bsd builds.

* new lang command.

* macos help.

* Lint fixes.

* minor refactor of term and new examples.

* unit tests and examples for asa.

* refactored asa global vars.

* byter examples and docs.

* fixed NewLine to work as intended.
new example for NewLine.

* rm unused DirExpansion func.

* new fsys examples.

* ren asa package to xud.
moved iso-11 into xud.
iso-11 table not formatting.

* fixed iso 11 table.

* fixed broken lang cmd.

* sample comments and examples.
removed unused File struct.

* logs and online examples.

* linebreak examples and minor refactor.

* moved the nl package and improved comments.

* newlines are handled by the nl package.

* removed LB type.
Use [2]rune instead for clarity in code.

* acorn newline.

* removed unused names struct.

* examples for info.

* Lint fixes.

* examples for detail.

* changed testdata.

* simplified Convert{} and clarity to names.

* refactor for simplification.

* fsys doc improvements.

* added cmd documentation.

* Improved comments of bool funcs.

* removed the internal utils pkg of fsys.

* Comments added to consts.

* new task tag command.

* cleaned  up repo tools and config.

* get cache returns a struct.

* removed nolint comments.

* renamed two view flags,
--encode > input
--to > output

* refactored some of the internal cmd packages
for clarity.

* refactor and doc update for the cmd pkgs.

* proper long description for the info cmd.

* tweaked errors and help texts.

* fixed tables to correctly display
xud and iso11 codepages.

* removed newline prefix for json, xml info formats.

* dropped -- prefix from flag comments.

* view width flag works.

* add clarity for width newline replacement.

* swap-chars and controls flags for the view
command are working.

* tabs are now replaced with 3 spaces, not 2.

* bug fix for 0 byte files.

* reordered example for clarity.

* replaced --output hidden flag with original.

* extended view help.
codepage is now referenced as code page.

* Update install notes.

* comment for tools.

* fix or removed TODOs.

* parallel tests.

* Parallel lint fixes.

* removed a number of nolint comments.

* test fixes.

* test repairs.

* new hex a dec commands.

* removed paralllel on pipe test.

* new base number type for xhex.

* new dump command.

* renamed xhex pkg to hexa.

* dump cmd example.

* added missing dec,hex,dump cmds.

* real world examples.

* simplified cmd for clarity.

* doc tweaks.

* fixed pipe data.

* testdata for real world texts.

* rm dead code.

* rm accidental inc.

* fixed binary name.

* archlinux package.
install.md typo fixes.

* tweaked texts.

* ren goreleaser dist dir.

* moved packages into root with the
intention of removing the pkg/ dir.

* removed pkg/ directory!

* ren static/text dir to ../plaintext

* merged static package into sample.

* removed unused bbs dir.

* removed cmd/pkg directory.

* lint and test fixes.

* Update FUNDING.yml

* Mod updates.

* Add support for legacy checksums flag in info command

* Fixed unused sauce date.

* Update RetroTxt documentation

* Refactor build-race task to buildr

* Fix rand.Int panics due to invalid max values.

* Fixed broken tests caused by LegacySums = false

* Fix race conditions.

* fix color bleading in aix ansi.

* fixed samples.

* Add initial release for version 1.0.0

* Go releaser action
  • Loading branch information
bengarrett authored Jan 8, 2024
1 parent 4a60fd8 commit ebe69f0
Show file tree
Hide file tree
Showing 164 changed files with 11,686 additions and 3,713 deletions.
69 changes: 0 additions & 69 deletions .brew/.goreleaser.yml

This file was deleted.

13 changes: 2 additions & 11 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
# These are supported funding model platforms

github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
["https://www.buymeacoffee.com/4rtEGvUIY", "https://paypal.me/BenGarrettAU"]
github: bengarrett
ko_fi: codebyben
8 changes: 3 additions & 5 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@ Is this a documentation update (if yes, please continue onto _Changes proposed_)

Platforms tested or developed on:

- [ ] Windows 10
- [ ] Windows
- [ ] macOS
- [ ] Linux
- [ ] macOS (Intel)
- [ ] macOS (ARM)
- [ ] BSD
- [ ] Raspberry Pi/ARM Linux
- [ ] other

Do the changes validate with [golangci-lint](https://golangci-lint.run/)?: \_

Expand Down
25 changes: 16 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
# .github/workflows/release.yml
name: goreleaser

on:
pull_request:
push:
# run only against tags
tags:
- "*"
workflow_dispatch:

permissions:
contents: write
# packages: write
# issues: write

jobs:
goreleaser:
Expand All @@ -17,18 +25,17 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.18
- name: Cache Go modules
uses: actions/[email protected]
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
go-version: stable
# More assembly might be required: Docker logins, GPG, etc.
# It all depends on your needs.
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
# either 'goreleaser' (default) or 'goreleaser-pro'
distribution: goreleaser
version: latest
args: release --rm-dist
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@
retrotxt
retrotxt.exe
retrotxtgo
retrotxtgo.exe

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# GoReleaser
/.dist
/dist

# Editor
Expand Down
53 changes: 50 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# golangci-lint is a fast Go linters runner.
# https://golangci-lint.run
#
# golangci-lint run
linters:
enable-all: true
Expand All @@ -19,12 +22,56 @@ linters:
- wrapcheck # wrapping 3rd party errors are unnecessary (opinionated)
- varnamelen # doesn't allow short vars (opinionated)
- goimports # conflicts with gci
- godox # hide, TODOs are fine
- nlreturn # opinionated
- wsl # opinionated
- paralleltest # temp disabled
#- paralleltest # temp disabled

linters-settings:
cyclop:
# the maximal code complexity to report
max-complexity: 15
max-complexity: 15

issues:
exclude-rules:
# all test files
- path: '(.+)_test\.go'
linters:
- gocognit
- gochecknoinits
# all cmd files
- path: 'cmd/(.+)\.go'
linters:
- gochecknoglobals
- gochecknoinits
# individual files
- path: main.go
linters:
- gochecknoglobals
- path: cmd/internal/flag/flag.go
linters:
- ireturn
- path: meta/meta.go
linters:
- gochecknoglobals
- path: convert/encoding.go
linters:
- cyclop
- funlen
- ireturn
- path: info/detail.go
linters:
- gosec
- lll
- path: internal/mock/mock.go
linters:
- gosec
- path: logs/logs_test.go
linters:
- goerr113
- path: table/table.go
linters:
- ireturn
- path: xud/xud.go
linters:
- gochecknoglobals
- ireturn
56 changes: 29 additions & 27 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# GoReleaser configuration
# Release Go projects as fast and easily as possible.
# https://goreleaser.com
#
# .goreleaser.yml
#
# test the config:
# to test this config:
# goreleaser check
# goreleaser release --snapshot --clean
#
Expand All @@ -9,35 +13,52 @@
# git push origin v0.1.0

project_name: retrotxtgo
# make a variable description
dist: './.dist' # make dist a hidden directory to avoid cluttering the project root

before:
hooks:
- go mod tidy
builds:
- id: BSD
binary: retrotxt
goos: ['freebsd']
goarch: ['amd64']
- id: Linux_Intel
binary: retrotxt
goos: ['linux']
goarch: ['amd64']
- id: Linux_arm64
binary: retrotxt
goos: ['linux']
goarch: ['arm64']
- id: macOS
binary: retrotxt
goos: ['darwin']
goarch: ['amd64', 'arm64']
- id: Windows
binary: retrotxt
goos: ['windows']
goarch: ['amd64']
universal_binaries:
- id: macOS
name_template: "{{ .ProjectName }}"
replace: true

archives:
archives:
- id: BSD
builds: ['BSD']
format: tar.gz
files:
- none*
name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}"
- id: Linux_Intel
builds: ['Linux_Intel']
format: tar.gz
files:
- none*
name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}"
- id: Linux arm
builds: ['Linux arm']
- id: Linux_arm64
builds: ['Linux_arm64']
format: tar.gz
files:
- none*
Expand All @@ -62,35 +83,16 @@ nfpms:
vendor: Ben Garrett.
homepage: https://retrotxt.com/go
maintainer: Ben Garrett <[email protected]>
description: Read legacy codepage encoded textfiles in a modern Unicode terminal.
description: Read legacy code page encoded textfiles in a modern Unicode terminal.
license: LGPL 3.0
formats:
- apk
- deb
- rpm

scoops:
- commit_author:
name: goreleaserbot
email: [email protected]
- commit_msg_template: "Scoop update for {{ .ProjectName }} version {{ .Tag }}"
- homepage: "https://retrotxt.com/go"
- description: "Read legacy codepage encoded textfiles in a modern Unicode terminal."
- license: "LGPL 3.0"
# Setting this will prevent goreleaser to actually try to commit the updated
# manifest leaving the responsibility of publishing it to the user.
# If set to auto, the release will not be uploaded to the scoop bucket
# in case there is an indicator for prerelease in the tag e.g. v1.0.0-rc1
# Default is false.
- skip_upload: auto
# Repository to push the generated files to.
- repository:
owner: bengarrett
name: retrotxtgo
branch: dev
- archlinux

changelog:
skip: false
skip: true
use: git

upx:
Expand Down
11 changes: 0 additions & 11 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,4 @@
"go.formatFlags": [
"-local \"retrotxt.com/retrotxt\""
],
"spellright.language": [
"en_US"
],
"spellright.documentTypes": [
"markdown",
"latex",
"plaintext"
],
"spellright.notificationClassByParser": {
"code": "hint"
}
}
9 changes: 0 additions & 9 deletions .vscode/spellright.dict

This file was deleted.

Loading

0 comments on commit ebe69f0

Please sign in to comment.