Skip to content

Commit

Permalink
fun with make and jq
Browse files Browse the repository at this point in the history
  • Loading branch information
billhails committed Sep 12, 2021
1 parent d838ba5 commit d8bd93a
Show file tree
Hide file tree
Showing 42 changed files with 153 additions and 23 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

THEMEDIRS=agate antique antique-hard basic bathroom jade jade-hard sakura shell-slate shell-slate-hard yuki yunzi yunzi-hard

default: copy

all: $(THEMEDIRS)

$(THEMEDIRS): %: FORCE
Expand Down
10 changes: 9 additions & 1 deletion Makefile.common
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
SHELL=/bin/bash

all: ${NAME}.sabakitheme.asar

${NAME}.sabakitheme.asar: theme/package.json theme/styles.css theme/images/*.png
${NAME}.sabakitheme.asar: theme/package.json
asar pack ./theme $@

# https://stedolan.github.io/jq/
theme/package.json: theme.package.json version.json ../common.package.json theme/styles.css theme/images/*.png
jq '{major, minor, patch: (.patch + 1)}' version.json > version.json.tmp
mv version.json.tmp version.json
jq -s '.[0] * {version: "\(.[1].major).\(.[1].minor).\(.[1].patch)"} * .[2]' theme.package.json version.json ../common.package.json > $@

# vim: noet sw=8
4 changes: 4 additions & 0 deletions agate/theme.package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "Agate",
"description": "A theme with agate stones for Sabaki"
}
4 changes: 2 additions & 2 deletions agate/theme/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "Agate",
"version": "0.1.1",
"description": "A theme with agate stones for Sabaki",
"version": "1.0.4",
"author": "Bill Hails",
"license": "CC0-1.0",
"homepage": "https://github.com/billhails/SabakiThemes",
"license": "CC0-1.0",
"main": "styles.css"
}
5 changes: 5 additions & 0 deletions agate/version.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"major": 1,
"minor": 0,
"patch": 4
}
4 changes: 4 additions & 0 deletions antique-hard/theme.package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "Antique (hard light)",
"description": "A theme with antique single-convex yunzi stones for Sabaki"
}
4 changes: 2 additions & 2 deletions antique-hard/theme/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "Antique (hard light)",
"version": "0.1.5",
"description": "A theme with antique single-convex yunzi stones for Sabaki",
"version": "1.0.7",
"author": "Bill Hails",
"license": "CC0-1.0",
"homepage": "https://github.com/billhails/SabakiThemes",
"license": "CC0-1.0",
"main": "styles.css"
}
5 changes: 5 additions & 0 deletions antique-hard/version.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"major": 1,
"minor": 0,
"patch": 7
}
4 changes: 4 additions & 0 deletions antique/theme.package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "Antique (Soft Light)",
"description": "A theme with antique single-convex yunzi stones for Sabaki"
}
4 changes: 2 additions & 2 deletions antique/theme/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "Antique (Soft Light)",
"version": "0.1.5",
"description": "A theme with antique single-convex yunzi stones for Sabaki",
"version": "1.0.7",
"author": "Bill Hails",
"license": "CC0-1.0",
"homepage": "https://github.com/billhails/SabakiThemes",
"license": "CC0-1.0",
"main": "styles.css"
}
5 changes: 5 additions & 0 deletions antique/version.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"major": 1,
"minor": 0,
"patch": 7
}
4 changes: 4 additions & 0 deletions basic/theme.package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "Basic",
"description": "A basic theme with glass stones and a beechwood board for Sabaki"
}
4 changes: 2 additions & 2 deletions basic/theme/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "Basic",
"version": "0.1.3",
"description": "A basic theme with glass stones and a beechwood board for Sabaki",
"version": "1.0.5",
"author": "Bill Hails",
"license": "CC0-1.0",
"homepage": "https://github.com/billhails/SabakiThemes",
"license": "CC0-1.0",
"main": "styles.css"
}
5 changes: 5 additions & 0 deletions basic/version.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"major": 1,
"minor": 0,
"patch": 5
}
4 changes: 4 additions & 0 deletions bathroom/theme.package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "Trump's Bathroom",
"description": "A theme with semi-precious stones and a marble board for Sabaki"
}
3 changes: 1 addition & 2 deletions bathroom/theme/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
{
"name": "Trump's Bathroom",
"version": "0.1.5",
"description": "A theme with semi-precious stones and a marble board for Sabaki",
"version": "1.0.7",
"author": "Bill Hails",
"homepage": "https://github.com/billhails/SabakiThemes",
"license": "CC0-1.0",
"homepage": "https://github.com/billhails/SabakiThemes",
"main": "styles.css"
}
5 changes: 5 additions & 0 deletions bathroom/version.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"major": 1,
"minor": 0,
"patch": 7
}
7 changes: 7 additions & 0 deletions common.package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"author": "Bill Hails",
"homepage": "https://github.com/billhails/SabakiThemes",
"license": "CC0-1.0",
"homepage": "https://github.com/billhails/SabakiThemes",
"main": "styles.css"
}
4 changes: 4 additions & 0 deletions jade-hard/theme.package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "Jade (hard light)",
"description": "A theme with jade stones for Sabaki"
}
3 changes: 1 addition & 2 deletions jade-hard/theme/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
{
"name": "Jade (hard light)",
"version": "0.1.4",
"description": "A theme with jade stones for Sabaki",
"version": "1.0.6",
"author": "Bill Hails",
"homepage": "https://github.com/billhails/SabakiThemes",
"license": "CC0-1.0",
"homepage": "https://github.com/billhails/SabakiThemes",
"main": "styles.css"
}
5 changes: 5 additions & 0 deletions jade-hard/version.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"major": 1,
"minor": 0,
"patch": 6
}
4 changes: 4 additions & 0 deletions jade/theme.package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "Jade (soft light)",
"description": "A theme with jade stones for Sabaki"
}
3 changes: 1 addition & 2 deletions jade/theme/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
{
"name": "Jade (soft light)",
"version": "0.1.0",
"description": "A theme with jade stones for Sabaki",
"version": "1.0.2",
"author": "Bill Hails",
"homepage": "https://github.com/billhails/SabakiThemes",
"license": "CC0-1.0",
"homepage": "https://github.com/billhails/SabakiThemes",
"main": "styles.css"
}
5 changes: 5 additions & 0 deletions jade/version.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"major": 1,
"minor": 0,
"patch": 2
}
4 changes: 4 additions & 0 deletions sakura/theme.package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "Sakura",
"description": "A Sakura (cherry blossom) theme for Sabaki"
}
4 changes: 2 additions & 2 deletions sakura/theme/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "Sakura",
"version": "0.1.4",
"description": "A Sakura (cherry blossom) theme for Sabaki",
"version": "1.0.6",
"author": "Bill Hails",
"license": "CC0-1.0",
"homepage": "https://github.com/billhails/SabakiThemes",
"license": "CC0-1.0",
"main": "styles.css"
}
5 changes: 5 additions & 0 deletions sakura/version.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"major": 1,
"minor": 0,
"patch": 6
}
4 changes: 4 additions & 0 deletions shell-slate-hard/theme.package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "Clamshell & Slate (Hard Light)",
"description": "A clamshell and slate theme for Sabaki"
}
2 changes: 1 addition & 1 deletion shell-slate-hard/theme/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Clamshell & Slate (Hard Light)",
"version": "0.1.3",
"description": "A clamshell and slate theme for Sabaki",
"version": "1.0.5",
"author": "Bill Hails",
"homepage": "https://github.com/billhails/SabakiThemes",
"license": "CC0-1.0",
Expand Down
5 changes: 5 additions & 0 deletions shell-slate-hard/version.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"major": 1,
"minor": 0,
"patch": 5
}
4 changes: 4 additions & 0 deletions shell-slate/theme.package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "Clamshell & Slate (soft light)",
"description": "A clamshell and slate theme for Sabaki"
}
2 changes: 1 addition & 1 deletion shell-slate/theme/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Clamshell & Slate (soft light)",
"version": "0.1.1",
"description": "A clamshell and slate theme for Sabaki",
"version": "1.0.3",
"author": "Bill Hails",
"homepage": "https://github.com/billhails/SabakiThemes",
"license": "CC0-1.0",
Expand Down
5 changes: 5 additions & 0 deletions shell-slate/version.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"major": 1,
"minor": 0,
"patch": 3
}
4 changes: 4 additions & 0 deletions yuki/theme.package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "Yuki",
"description": "A theme with yuki-grade clamshell & slate stones for Sabaki"
}
3 changes: 1 addition & 2 deletions yuki/theme/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
{
"name": "Yuki",
"version": "0.1.1",
"description": "A theme with yuki-grade clamshell & slate stones for Sabaki",
"version": "1.0.3",
"author": "Bill Hails",
"homepage": "https://github.com/billhails/SabakiThemes",
"license": "CC0-1.0",
"homepage": "https://github.com/billhails/SabakiThemes",
"main": "styles.css"
}
5 changes: 5 additions & 0 deletions yuki/version.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"major": 1,
"minor": 0,
"patch": 3
}
4 changes: 4 additions & 0 deletions yunzi-hard/theme.package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "Yunzi (hard light)",
"description": "A theme with yunzi stones for Sabaki"
}
2 changes: 1 addition & 1 deletion yunzi-hard/theme/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Yunzi (hard light)",
"version": "0.1.3",
"description": "A theme with yunzi stones for Sabaki",
"version": "1.0.5",
"author": "Bill Hails",
"homepage": "https://github.com/billhails/SabakiThemes",
"license": "CC0-1.0",
Expand Down
5 changes: 5 additions & 0 deletions yunzi-hard/version.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"major": 1,
"minor": 0,
"patch": 5
}
4 changes: 4 additions & 0 deletions yunzi/theme.package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "Yunzi (soft light)",
"description": "A theme with yunzi stones for Sabaki"
}
2 changes: 1 addition & 1 deletion yunzi/theme/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Yunzi (soft light)",
"version": "0.1.3",
"description": "A theme with yunzi stones for Sabaki",
"version": "1.0.5",
"author": "Bill Hails",
"homepage": "https://github.com/billhails/SabakiThemes",
"license": "CC0-1.0",
Expand Down
5 changes: 5 additions & 0 deletions yunzi/version.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"major": 1,
"minor": 0,
"patch": 5
}

0 comments on commit d8bd93a

Please sign in to comment.