Update automated build process

This commit is contained in:
Cole Bemis 2017-05-13 01:50:01 -07:00
parent 6ee713361c
commit b25e6c255b
6 changed files with 28 additions and 6 deletions

2
.gitignore vendored
View File

@ -1,5 +1,7 @@
.DS_Store .DS_Store
node_modules node_modules
_site _site
*.zip
manifest.json
sandbox sandbox
stash stash

View File

@ -1,5 +1,5 @@
<ul class="flex flex-wrap justify-center w-80 w-80-ns center mw8 mv0 pl0 list"> <ul class="flex flex-wrap justify-center w-80 w-80-ns center mw8 mv0 pl0 list">
{% for icon in site.data['icons-manifest'] %} {% for icon in site.data['manifest'] %}
{% capture icon_path %}icons/{{ icon }}.svg{% endcapture %} {% capture icon_path %}icons/{{ icon }}.svg{% endcapture %}
<li class="icon relative pa3 ma2 black-90 bg-animate br3 outline-0 pointer"> <li class="icon relative pa3 ma2 black-90 bg-animate br3 outline-0 pointer">
{% include_relative {{ icon_path }} %} {% include_relative {{ icon_path }} %}

View File

@ -1,7 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# find and store current version number ./bin/make-manifest.sh > manifest.json
version=$(grep '"version"' package.json | cut -d '"' -f4) ./bin/make-zip.sh
jekyll build
# compress 'icons' directory into feather-[version].zip
zip -r feather-${version}.zip ./icons/*

15
bin/make-manifest.sh Executable file
View File

@ -0,0 +1,15 @@
#!/usr/bin/env bash
cd ./icons
n=$(ls -1 | wc -l)
m=0
echo "["
for i in $(ls -1 *.svg | cut -d '.' -f 1 )
do
m=$((m + 1))
echo -n " "\"$i\"
[ "$m" == $n ] && echo "" || echo ","
done
echo "]"

7
bin/make-zip.sh Executable file
View File

@ -0,0 +1,7 @@
#!/usr/bin/env bash
# find and store current version number
version=$(grep '"version"' package.json | cut -d '"' -f4)
# compress 'icons' directory into feather-[version].zip
zip -r feather-${version}.zip ./icons/