carloscuesta / gitmoji

An emoji guide for your commit messages. 😜
https://gitmoji.dev
MIT License
15.44k stars 808 forks source link

✨ Add "gitmoji_version" field to schema #1753

Closed danielwerg closed 3 weeks ago

danielwerg commented 3 weeks ago

Description

I pipe gitmojis.json file to dmenu and it would be nice to have gitmoji version there as well, so I would know if I'm using outdated version quickly.

cat gitmojis.json | jq 'JQ magic' | wofi --show dmenu --prompt 'Search gitmoji...but what version hmmm'

After merge could be change to:

cat gitmojis.json | jq 'JQ magic' | wofi --show dmenu --prompt "Search gitmoji ($(cat gitmojis.json | jq -r '.gitmoji_version'))"
vercel[bot] commented 3 weeks ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
gitmoji ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 11, 2024 4:07pm
carloscuesta commented 3 weeks ago

Hey!

This is already versioned as part of the package.json. I don't think it's worth introducing another source of truth for version that needs to be mantained

Thanks for the PR!

danielwerg commented 3 weeks ago
gitmoji_version=$(curl -sS 'https://raw.githubusercontent.com/carloscuesta/gitmoji/master/packages/gitmojis/package.json' | jq -r '.version')
gitmojis=$(curl -sS 'https://raw.githubusercontent.com/carloscuesta/gitmoji/master/packages/gitmojis/src/gitmojis.json' | jq ". += {\"gitmoji_version\": \"$gitmoji_version\"}")