Commit Graph

20 Commits

Author SHA1 Message Date
Fabian Wickborn 853db6cec8 genfileembed: Add flag for adding build tags
The build tags are written into the resulting go files literally, e.g.
a call like

    genfileembed -build-tags "linux,386 darwin,!cgo"

is written as

// +build linux,386 darwin,!cgo

to the resulting files.

Change-Id: Ic8c7e827e3040a33fe3b920c1aaa1551f902a491
2014-10-17 20:58:15 +02:00
Fabian Wickborn 119b38966a genfileembed: command line flag for pattern file
Offer a choice from which go-file the #fileembed pattern is read. The
default is still "fileembed.go".

Change-Id: Ida98850162adec33a6555b09ad320bd9ee573b8d
2014-10-17 13:11:23 +02:00
Brad Fitzpatrick 7ee69bd716 make.go, genfileembed: track genfileembed output files and delete stale ones
Don't just trust all zembed_*.go files to be wanted. Instead, we now
ask genfileembed to write out its output files to stderr, parse that,
and add those to our set of wanted files. Then when we look for
unwanted files that aren't known outputs that now also potentially
includes zembed_*.go files.

This fixes a JavaScript breakage from when Aaron renamed some
JavaScript files recently.

Turns out I had 4 such files that were stale outputs.

In other news, I hereby declare a moratorium on updates to make.go.
It has become disgusting and is need of cleanup love before it is
disgraced further.

Change-Id: Ia1432d21ce486bfbca9e3c9db6f1852b859ebfc0
2014-08-16 18:19:38 -07:00
Brad Fitzpatrick ed23a4d979 fileembed: don't concatenate more than 50 string literals
Workaround for https://code.google.com/p/go/issues/detail?id=8240 /
camlistore.org/issue/460

Change-Id: Id11940742416b88d36bec686699f937d3858dd58
2014-06-20 10:09:52 -07:00
Aaron Boodman 05fe532fc2 Fix broken embedding of fontawesome in production
Change-Id: I8e8f6b3950ecc319b4516d4be0b0c720113f0b9f
2014-04-11 22:00:33 -07:00
Aaron Boodman 257c471ff2 Don't rebuild file embeds if they haven't changed.
Change-Id: Ia3de5b5dc00341254b76b7adf88bf6038319690e
2014-04-05 19:40:06 -07:00
Aaron Boodman 2c675b3a87 Add FontAwesome. This will be used for icons in the UI.
Change-Id: I92fecd44f12cce83f4daee88bce062d9123a48a7
2014-04-05 17:19:29 -07:00
Brad Fitzpatrick 40e0a86315 genfileembed: touch the file modtime, even if contents are same, but it's old
Change-Id: I88d429445da6e251e4aebc0e31017e4ca8f0dd51
2014-02-27 21:00:01 -08:00
Brad Fitzpatrick 1c54500e54 genfileembed: also consider the modtime of the fileembed.go file itself.
Change-Id: I73f2f5d472ceda10724a1612e2f088e50c7258db
2013-06-21 20:17:08 -07:00
Brad Fitzpatrick dcc41792fb Add a genfileembed package comment
Change-Id: I65bfd3c1956921bb8d1d805cd6df84bc376ec802
2013-06-11 00:55:31 +02:00
Brad Fitzpatrick 3658434d42 fileembed: remove Camlistore-specific hack we're no longer going to do.
death to all.js & Closure compiler output. Yay SPDY.

Change-Id: I44ca96d1b6d1d5d64822870558025e15dee4870c
2013-06-10 01:47:45 +02:00
Brad Fitzpatrick c6cb32bcac fileembed: put all metadata first, and also support rolling checksum splitting of large embeds
Change-Id: I9da21c9a21cb2f9b04484d4374a621cb4b97679d
2013-06-10 01:11:03 +02:00
Brad Fitzpatrick 99267e1f71 Merge "Add -fileembed-package and -all flags" 2013-06-05 16:39:04 +00:00
Josh Bleecher Snyder f72c466501 Add -fileembed-package and -all flags
The -fileembed-package flag makes genfileembed
play nicely with goven. If you use goven to
vendorize fileembed, the fileembed package path
changes (to be relative to the current project).
With -fileembed-package, you can make the
generated code import the correct (vendorized)
fileembed package.

The -all flag forces processing of all files,
not just modified files. This is useful when
changing -import-prefix, when
working on a filesystem with unreliable mtimes,
or when being neurotic/defensive in build scripts.

Addresses https://code.google.com/p/camlistore/issues/detail?id=137

Change-Id: I54215429dabd02bc1fa72c6718e1cabccb1cffaf
2013-06-04 19:07:58 -07:00
mpl 11a3f78691 WIP: switch from ui to newui
This CL proposes 4 changes:

1) When making the embeds, any .html files in newui is rewwritten
on the fly so that the resulting embed uses all.js instead of
individual .js files. all.js is the only javascript file embedded
for newui.

2) Various bugs and paths in the newui/*.js files were fixed so that
everything works when using all.js

3) pkg/server/ui.go was modified so that all features from ui should
now have an equivalent in newui, that is served through ui/new/.
In a next step, we can move back everything from newui/ into ui/ and
completely get rid of the old ui.

4) The published gallery now uses closure too.
In another next step, we should probably work on serving its static
part directly from an .html file or (include it in the zembed somehow?)
instead of generating it at every request. Or at least cache it?

This commit includes the zembeds in newui, except for zembed_all.js.go
since it is large and it would take a lot of space in the git history
everytime we change it.
The plan is to roll-sum it into chunks to address that problem.

Change-Id: I381d8ddf3a2bbe37e3c4b1c4bf423f16beffaaf4
2013-06-04 16:34:51 +02:00
mpl 8d3c5acca7 website,genfileembed: exclude zembeds and fileembed.go from godoc
Change-Id: I6af25a566a519274b15b72c3e41dccd016de5442
2013-03-16 01:16:40 +01:00
mpl f7ff5bb17b file embedding: enable compression (mainly for
large .js files).

We will need this when we start getting large js
files generated when using the closure library.

Change-Id: Iaecacd54c3d08637918b1afd420fb90f1a84aabb
2012-11-30 19:03:37 +01:00
Brad Fitzpatrick 824dbf768f genfileembed: work around a Go 1.0 vs Go 1.1 bug in fmt %q, doing it ourselves.
folder.png and node.png had problems generating on Go 1.1's %q and compiling with Go 1.0.3
2012-11-05 18:43:20 +01:00
Brad Fitzpatrick a98c59f082 include file modtimes in filembed
Change-Id: I9255071c163664bd9b00786df65e630668e227d0
2012-02-28 22:49:52 -08:00
Brad Fitzpatrick 552b768eeb add genfileembed tool, to embed html/css/js/etc into zembed_*.go files 2012-02-28 14:50:17 +11:00