mirror of
https://github.com/jimeh/homebrew-emacs-builds.git
synced 2026-02-19 13:16:38 +00:00
feat(meta): initial setup for generating meta json files
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
Brewfile.lock.json
|
||||
39
Makefile
Normal file
39
Makefile
Normal file
@@ -0,0 +1,39 @@
|
||||
TAP = jimeh/emacs-builds
|
||||
|
||||
.DEFAULT: update
|
||||
|
||||
update: casks cask-shields
|
||||
|
||||
#
|
||||
# Cask Meta
|
||||
#
|
||||
|
||||
CASKS = $(notdir $(shell \
|
||||
brew tap-info --json "$(TAP)" | jq -r '.[0].cask_tokens[]' | sort \
|
||||
))
|
||||
|
||||
CASK_META_FILES = $(foreach c,$(CASKS),Casks/$(c)/meta.json)
|
||||
|
||||
casks: $(CASK_META_FILES)
|
||||
|
||||
.PHONY: $(CASK_META_FILES)
|
||||
$(CASK_META_FILES): Casks/%/meta.json:
|
||||
mkdir -p "$(dir $@)"
|
||||
brew info --cask --json=v2 "$(TAP)/$*" | jq '.casks[0]' > "$@"
|
||||
|
||||
#
|
||||
# Shields Meta (for shields.io)
|
||||
#
|
||||
|
||||
CASK_SHIELDS = $(foreach c,$(CASKS),$(if \
|
||||
$(shell test -f "templates/Casks/$(c)/shield.json.tpl" && echo ok),$(c),\
|
||||
))
|
||||
CASK_SHIELD_FILES = $(foreach c,$(CASK_SHIELDS),Casks/$(c)/shield.json)
|
||||
|
||||
cask-shields: $(CASK_SHIELD_FILES)
|
||||
|
||||
.PHONY: $(CASK_SHIELD_FILES)
|
||||
$(CASK_SHIELD_FILES): Casks/%/shield.json:
|
||||
mkdir -p "$(dir $@)"
|
||||
brew info --cask --json=v2 "$(TAP)/$*" | \
|
||||
jq ".casks[0] | $$(cat "templates/Casks/$*/shield.json.tpl")" > "$@"
|
||||
9
templates/Casks/emacs-app-good/shield.json.tpl
Normal file
9
templates/Casks/emacs-app-good/shield.json.tpl
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
schemaVersion: 1,
|
||||
style: "flat",
|
||||
color: "#7F5AB6",
|
||||
namedLogo: "GNU Emacs",
|
||||
logoColor: "white",
|
||||
label: "known good nightly",
|
||||
message: .version
|
||||
}
|
||||
9
templates/Casks/emacs-app-nightly/shield.json.tpl
Normal file
9
templates/Casks/emacs-app-nightly/shield.json.tpl
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
schemaVersion: 1,
|
||||
style: "flat",
|
||||
color: "#7F5AB6",
|
||||
namedLogo: "GNU Emacs",
|
||||
logoColor: "white",
|
||||
label: "nightly",
|
||||
message: .version
|
||||
}
|
||||
9
templates/Casks/emacs-app/shield.json.tpl
Normal file
9
templates/Casks/emacs-app/shield.json.tpl
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
schemaVersion: 1,
|
||||
style: "flat",
|
||||
color: "#7F5AB6",
|
||||
namedLogo: "GNU Emacs",
|
||||
logoColor: "white",
|
||||
label: "stable",
|
||||
message: ("v" + .version)
|
||||
}
|
||||
Reference in New Issue
Block a user