Permalink
Browse files

Clean up build dir before distribution, switch to curl

  • Loading branch information...
eelco committed Jun 27, 2016
1 parent 99980ec commit a7a6de03f3a0f114b724379f077f77a3cd6dc98c
Showing with 11 additions and 4 deletions.
  1. +11 −4 scripts/dist.sh
View
@@ -3,19 +3,26 @@
GENERATOR_HOST="http://framergenerator-update.s3-website-us-east-1.amazonaws.com"
GENERATOR_LATEST=$GENERATOR_HOST/`curl -s $GENERATOR_HOST/latest.txt`
# Copy over the project structure
# Clean up previous builds
rm -Rf build/Framer
mkdir -p build/Framer
# Copy over the project structure
cp -R extras/templates/Project build/Framer/Project
# Copy over the framer build files
rm -Rf build/Framer/Project/framer
mkdir -p build/Framer/Project/framer
cp build/framer.js build/Framer/Project/framer/framer.js
cp build/framer.js.map build/Framer/Project/framer/framer.js.map
# Download the latest generator
cd build/Framer; wget "$GENERATOR_LATEST" -O "generator.tgz"; tar zxf "./generator.tgz"; rm "./generator.tgz"; cd -
cd build/Framer
curl "${GENERATOR_LATEST// /%20}" -o "generator.tgz"
tar zxf "./generator.tgz"
rm "./generator.tgz"
cd -
# Clean up and zip the result
find build/Framer -name ".DS_Store" -depth -exec rm {} \;
cd build; zip -r -y Framer.zip Framer
cd build
zip -r -y Framer.zip Framer

0 comments on commit a7a6de0

Please sign in to comment.