File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 1
1
name : Get/Update Primer Color Primitives
2
2
3
3
env :
4
- _DEST : ' ${{ github.workspace }}/lua/github-theme/palette/primitives'
4
+ _DEST_DIR : ' ${{ github.workspace }}/lua/github-theme/palette/primitives'
5
5
_JSON_DIR : ' ${{ github.workspace }}/node_modules/@primer/primitives/dist/json/colors'
6
6
_LICENSE_GLOB : ' ${{ github.workspace }}/node_modules/@primer/primitives/[Ll][Ii][Cc][Ee][Nn][Ss][Ee]*'
7
7
_PRIMITIVES_PKGJSON : ' ${{ github.workspace }}/node_modules/@primer/primitives/package.json'
@@ -29,19 +29,21 @@ jobs:
29
29
set -u +f
30
30
shopt -s nocaseglob failglob
31
31
license="$(<$_LICENSE_GLOB)"
32
- mkdir -p "$_DEST"
32
+ rm -r "$_DEST_DIR" || :
33
+ mkdir -p "$_DEST_DIR"
33
34
cd "$_JSON_DIR"
34
35
35
36
if jq -e .version "$_PRIMITIVES_PKGJSON"; then
36
37
version="M._VERSION = vim.json.decode([=[$(jq -e .version "$_PRIMITIVES_PKGJSON")]=], { luanil = { object = false, array = false } })"
37
38
fi
38
39
39
40
for file in *.json; do
40
- cat >"${_DEST_DIR}/${file%.json}.lua" <<EOF
41
+ cat >| "${_DEST_DIR}/${file%.json}.lua" <<EOF
41
42
-- NOTE: THIS IS AN AUTO-GENERATED FILE. DO NOT EDIT BY-HAND.
42
43
local M = vim.json.decode([=[$(<"$file")]=], { luanil = { object = false, array = false } })
43
44
${version-}
44
- M._LICENSE = [=[$license]=]
45
+ M._LICENSE = [=[
46
+ $license]=]
45
47
return M
46
48
EOF
47
49
done
You can’t perform that action at this time.
0 commit comments