-
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.
- Loading branch information
Showing
5 changed files
with
168 additions
and
15 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,70 @@ | ||
# This is an example goreleaser.yaml file with some sane defaults. | ||
# Make sure to check the documentation at http://goreleaser.com | ||
project_name: gzipdate | ||
env: | ||
- GO111MODULE=on | ||
before: | ||
hooks: | ||
- go mod tidy | ||
builds: | ||
- env: | ||
- CGO_ENABLED=0 | ||
goos: | ||
- darwin | ||
- freebsd | ||
- linux | ||
- netbsd | ||
- openbsd | ||
- windows | ||
ignore: | ||
- goos: darwin | ||
goarch: 386 | ||
ldflags: | ||
- -s -w | ||
main: ./main.go | ||
archives: | ||
- files: | ||
- CHANGELOG.md | ||
- LICENSE | ||
- README.md | ||
format_overrides: | ||
- goos: windows | ||
format: zip | ||
replacements: | ||
386: i386 | ||
amd64: x86_64 | ||
darwin: macos | ||
# darwin: macOS | ||
# freebsd: FreeBSD | ||
# linux: Linux | ||
# netbsd: NetBSD | ||
# openbsd: OpenBSD | ||
# gzipdate: GzipDate | ||
# windows: Windows | ||
wrap_in_directory: true | ||
nfpms: | ||
# note that this is an array of nfpm configs | ||
- formats: | ||
- deb | ||
- rpm | ||
# ID of the nfpm config, must be unique. | ||
# Defaults to "default". | ||
id: gzipdate | ||
homepage: "https://github.com/runeimp/gzipdate" | ||
license: MIT | ||
replacements: | ||
386: i386 | ||
amd64: x86_64 | ||
darwin: macos | ||
checksum: | ||
name_template: 'checksums.txt' | ||
# signs: | ||
# - artifacts: checksum | ||
snapshot: | ||
name_template: "{{ .Tag }}-next" | ||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- '^docs:' | ||
- '^test:' |
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,10 @@ | ||
ChangeLog: | ||
========== | ||
|
||
v1.0.0 | ||
------ | ||
|
||
Initial release | ||
|
||
* Added all initially planned features | ||
|
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,71 @@ | ||
PROJECT_NAME := "GzipDate" | ||
|
||
alias arc := archive | ||
|
||
@_default: | ||
just _term-wipe | ||
just --list | ||
|
||
# Archive GoReleaser dist | ||
archive: | ||
#!/bin/sh | ||
just _term-wipe | ||
tag="$(git tag --points-at master)" | ||
app="{{PROJECT_NAME}}" | ||
arc="${app}_${tag}" | ||
|
||
# echo "app = '${app}'" | ||
# echo "tag = '${tag}'" | ||
# echo "arc = '${arc}'" | ||
if [ -e dist ]; then | ||
echo "Move dist -> distro/${arc}" | ||
mv dist "distro/${arc}" | ||
|
||
# echo "cd distro" | ||
cd distro | ||
|
||
printf "pwd = " | ||
pwd | ||
|
||
ls -Alh | ||
else | ||
echo "dist directory not found for archiving" | ||
fi | ||
|
||
# Build and install app | ||
build: | ||
@just _term-wipe | ||
go build -o gzipdate main.go | ||
mv gzipdate "${GOBIN}/" | ||
@# go install main.go | ||
|
||
|
||
# Build distro | ||
distro: | ||
#!/bin/sh | ||
goreleaser | ||
just archive | ||
|
||
|
||
# Run code | ||
run +args='': | ||
@just _term-wipe | ||
go run main.go {{args}} | ||
|
||
|
||
_term-wipe: | ||
#!/bin/sh | ||
if [[ ${#VISUAL_STUDIO_CODE} -gt 0 ]]; then | ||
clear | ||
elif [[ ${KITTY_WINDOW_ID} -gt 0 ]] || [[ ${#TMUX} -gt 0 ]] || [[ "${TERM_PROGRAM}" = 'vscode' ]]; then | ||
printf '\033c' | ||
elif [[ "$(uname)" == 'Darwin' ]] || [[ "${TERM_PROGRAM}" = 'Apple_Terminal' ]] || [[ "${TERM_PROGRAM}" = 'iTerm.app' ]]; then | ||
osascript -e 'tell application "System Events" to keystroke "k" using command down' | ||
elif [[ -x "$(which tput)" ]]; then | ||
tput reset | ||
elif [[ -x "$(which reset)" ]]; then | ||
reset | ||
else | ||
clear | ||
fi | ||
|
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