Permalink
Browse files

Only work for koenbok/framer

  • Loading branch information...
koenbok committed Mar 10, 2017
1 parent 475253a commit 9bc528cc1043e96a7c2aec3255b7c97336dbc620
Showing with 14 additions and 5 deletions.
  1. +14 −5 scripts/site.coffee
View
@@ -17,15 +17,17 @@ Config =
gzipExtensions: [".js", ".html", ".css", ".map"]
startAt: "2e97990"
-client = knox.createClient
- key: process.env.AWS_ACCESS_KEY_ID
- secret: process.env.AWS_SECRET_ACCESS_KEY
- bucket: Config.bucket
-
###############################################################
# Parse the command line
main = ->
+ exec "git config --local --get remote.origin.url", (err, output) ->
+ output = output.trim()
+ if output != "git@github.com:koenbok/framer.git"
+ throw Error("Not the right repo!", output)
+ _main()
+
+_main = ->
COMMANDS =
"upload": -> uploadDir Config.output
@@ -55,6 +57,8 @@ build = ->
exec "git log --pretty=format:\"%h\t%an\t%ad\t%s\" --first-parent master", (err, output) ->
throw err if err
+ console.log output
+
start = false
for line in output.split "\n"
@@ -78,6 +82,11 @@ uploadFile = (path, remotePath="") ->
console.log "Upload #{path} -> #{remotePath}"
+ client = knox.createClient
+ key: process.env.AWS_ACCESS_KEY_ID
+ secret: process.env.AWS_SECRET_ACCESS_KEY
+ bucket: Config.bucket
+
buffer = fs.readFileSync path
headers =
"Content-Type": mime.lookup path

0 comments on commit 9bc528c

Please sign in to comment.