Compare commits
2 commits
827700d343
...
c797998c84
Author | SHA1 | Date | |
---|---|---|---|
c797998c84 | |||
8beb28b2b9 |
3 changed files with 8 additions and 89 deletions
|
@ -3,76 +3,3 @@ pipeline:
|
|||
image: bats/bats
|
||||
commands:
|
||||
- /opt/bats/bin/bats test
|
||||
|
||||
release-prep: # prepare changelog and version information for release candidate
|
||||
when:
|
||||
event: tag
|
||||
tag: v*
|
||||
image: alpine
|
||||
commands:
|
||||
- sed -ne 's/bm_version=\(.*\)/\1/p' bemoji > NEWEST_VERSION.txt
|
||||
- awk '/^## \[\d/{p++} p==2{print; exit} p>=1' CHANGELOG.md | head -n -1 | tail -n+3 > NEWEST_CHANGES.txt
|
||||
|
||||
versioncompare: # ensure we correctly bumped versions
|
||||
when:
|
||||
event: tag
|
||||
tag: v*
|
||||
image: alpine
|
||||
secrets: [ github_release_token, github_repo ]
|
||||
commands:
|
||||
- apk add jq curl
|
||||
- "lastversion=$(curl -X GET -H \"Accept: application/vnd.github.v3+json\" -H \"Authorization: Bearer $GITHUB_RELEASE_TOKEN\" https://api.github.com/repos/$GITHUB_REPO/releases/latest | jq -r '.name')"
|
||||
- "programversion=$(cat NEWEST_VERSION.txt)"
|
||||
- changelogversion=$(sed -ne 's/^## \[\([0-9].*\)\].*$/\1/p' CHANGELOG.md | head -n1)
|
||||
- echo "Last version - $lastversion"
|
||||
- echo "New version - $programversion"
|
||||
- echo "Changelog version - $changelogversion"
|
||||
- "if [ \"$changelogversion\" != \"$programversion\" ]; then { echo \"VERSION MISMATCH: Changelog - $changelogversion, Program - $programversion\" && exit 1; }; fi"
|
||||
- "if [ \"$lastversion\" = \"$programversion\" ]; then { echo \"RELEASE DUPLICATE: Last release already had version - $programversion\" && exit 1; }; fi"
|
||||
|
||||
build:
|
||||
when:
|
||||
event: tag
|
||||
tag: v*
|
||||
image: savant/md2man
|
||||
commands:
|
||||
- apk update && apk add zip
|
||||
- BM_VERSION=$(cat NEWEST_VERSION.txt)
|
||||
- mkdir -p build/doc dist
|
||||
- cp bemoji build
|
||||
- md2man -in README.md -out bemoji.1 && gzip bemoji.1
|
||||
- cp LICENSE README.md bemoji.1.gz build/doc
|
||||
- tar -czvf bemoji-$BM_VERSION.tar.gz build/*
|
||||
- zip -r bemoji-$BM_VERSION.zip build/*
|
||||
- mv bemoji-$BM_VERSION.tar.gz bemoji-$BM_VERSION.zip dist
|
||||
|
||||
release-gitea:
|
||||
group: release
|
||||
when:
|
||||
event: tag
|
||||
tag: v*
|
||||
image: plugins/gitea-release
|
||||
settings:
|
||||
api_key:
|
||||
from_secret: gitea_release_token
|
||||
base_url: https://git.martyoeh.me
|
||||
files: dist/*
|
||||
title: NEWEST_VERSION.txt
|
||||
note: NEWEST_CHANGES.txt
|
||||
|
||||
release-github:
|
||||
when:
|
||||
event: tag
|
||||
tag: v*
|
||||
image: alpine
|
||||
secrets: [ github_release_token, github_repo ]
|
||||
commands:
|
||||
- apk add file jq curl
|
||||
- BM_VERSION=$(cat NEWEST_VERSION.txt)
|
||||
- BM_CHANGED=$(sed -e 's|#||g' -e 's|^.*$|\0 <br />|' NEWEST_CHANGES.txt) # display newlines workaround
|
||||
- echo "{\"tag_name\":\"$BM_VERSION\",\"target_commitish\":\"main\",\"name\":\"$BM_VERSION\",\"body\":\"$BM_CHANGED\",\"draft\":false,\"prerelease\":false,\"generate_release_notes\":false}" > data.json
|
||||
- "response=$(curl -X POST -H \"Accept:\\ application/vnd.github+json\" -H \"Authorization:\\ Bearer $GITHUB_RELEASE_TOKEN\" https://api.github.com/repos/$GITHUB_REPO/releases -d \"@data.json\")"
|
||||
- "uploadurl=$(echo $response | jq -r '.upload_url' | cut -d'{' -f1)"
|
||||
- "[ $uploadurl = null ] && { echo $response; exit 1; }"
|
||||
- "curl -X POST -H \"Accept:\\ application/vnd.github.v3+json\" -H \"Authorization:\\ Bearer $GITHUB_RELEASE_TOKEN\" -H \"Content-Type:\\ $(file -b --mime-type dist/bemoji-$BM_VERSION.zip)\" -H \"Content-Length:\\ $(wc -c <dist/bemoji-$BM_VERSION.zip | xargs)\" -T dist/bemoji-$BM_VERSION.zip \"$uploadurl?name=bemoji-$BM_VERSION.zip\""
|
||||
- "curl -X POST -H \"Accept:\\ application/vnd.github.v3+json\" -H \"Authorization:\\ Bearer $GITHUB_RELEASE_TOKEN\" -H \"Content-Type:\\ $(file -b --mime-type dist/bemoji-$BM_VERSION.tar.gz)\" -H \"Content-Length:\\ $(wc -c <dist/bemoji-$BM_VERSION.tar.gz | xargs)\" -T dist/bemoji-$BM_VERSION.tar.gz \"$uploadurl?name=bemoji-$BM_VERSION.tar.gz\""
|
||||
|
|
22
CHANGELOG.md
22
CHANGELOG.md
|
@ -7,20 +7,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
<!-- ### Added -->
|
||||
|
||||
<!-- ### Changed -->
|
||||
|
||||
<!-- ### Deprecated -->
|
||||
|
||||
<!-- ### Removed -->
|
||||
|
||||
<!-- ### Fixed -->
|
||||
|
||||
<!-- ### Security -->
|
||||
|
||||
## [0.3.0] - 2022-11-10
|
||||
|
||||
### Added
|
||||
|
||||
- Add new option `-n` which suppresses printing the final newline character in output
|
||||
|
@ -28,19 +14,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
### Changed
|
||||
|
||||
- Multiple command options can be combined
|
||||
- Allow downloading emoji sets at any time after initial run with `-D <choice>`
|
||||
- (!) History uses `XDG_STATE_HOME` directory by default:
|
||||
This constitutes a break in behavior if you relied a lot on your pick history in the default
|
||||
location. To retain your old history file, simply move it from the old cache directory
|
||||
(`~/.cache/bemoji-history.txt` by default) to the new one (`~/.local/state/bemoji-history.txt`
|
||||
by default).
|
||||
- (!) `XDG_CACHE_LOCATION` renamed to `XDG_HISTORY_LOCATION` to better signify its purpose
|
||||
- Allow downloading emoji sets at any time after initial run with `-D <choice>`
|
||||
|
||||
<!-- ### Deprecated -->
|
||||
|
||||
<!-- ### Removed -->
|
||||
|
||||
### Fixed
|
||||
|
||||
- Custom default command is only executed when no command option given
|
||||
- Results are matched case insensitively when using rofi picker to match other pickers
|
||||
|
||||
<!-- ### Security -->
|
||||
|
||||
## [0.2.0] - 2022-06-29
|
||||
|
||||
### Added
|
||||
|
|
2
bemoji
2
bemoji
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
bm_version=0.3.0
|
||||
bm_version=0.2.0
|
||||
# Emoji default database location
|
||||
bm_db_location=${BEMOJI_DB_LOCATION:-"${XDG_DATA_HOME:-$HOME/.local/share}/bemoji"}
|
||||
# Setting custom emoji list file location:
|
||||
|
|
Loading…
Reference in a new issue