Firebug Lite Build Process
From FirebugWiki
Revision as of 17:24, 22 September 2011 by Pedrosimonetti (Talk | contribs)
Contents |
[edit] Overview
[edit] TODO
- See which parts of the process can be simplified
- Automate the whole process
[edit] Installation and Updates
Firebug Lite differs from Firebug because there's no actual installation and update like in the software world, except when installed as a browser extension. There are basically four ways of loading Firebug Lite:
- Bookmarklet
- Live <script> tag link
- Local <script> tag link
- Browser extension
Browser extensions have a defined way to install and update the application.
Web-based versions have to be installed manually and the update scheme depends on how Firebug Lite was loaded:
- For the Bookmarklet and Live Link case we can update the application by publishing the releases on getfirebug.com.
- The Bookmarklet itself is a mini-application and cannot be automatically updated. Each bookmarklet has its own version and Firebug Lite checks the version and warns the user in case of a new bookmarklet version is available.
- For the Local Link case, there is no auto-updates. It is likely in this case to have a update checker module implemented, which is not yet done at the time of this writing (Mar 2011). It would load a JSONP file from getfirebug.com containing the most recent version number and would inform the user in case of a new version is available. This feature must be disabled via Firebug Lite options, so a user can opt-out checking for updates.
[edit] Release Channels
[edit] Firebug Lite release channels
- Stable - stable
- Debug - stable with debug settings
- Beta - beta
- Developer - real-time (SVN link)
Firebug Lite Stable, Debug and Beta versions are published on getfirebug.com. Developer versions are directly linked to our SVN repository.
[edit] Firebug Lite for Google Chrome release channels
- Stable - stable (Chrome extensions gallery)
- Beta - beta (getfirebug.com)
[edit] Build Variables
[edit] Cross-Browser Stable Channel
-
<compressed>= true -
<fileName>= "firebug-lite.js" -
<fileLocation>= "/lite/branches/firebug<majorVersion>/build/" -
<skinLocation>= "https://getfirebug.com/releases/lite/latest/skin/xp/" -
<publishChannelLocation>= "https://getfirebug.com/releases/lite/latest/" -
<publishVersionLocation>= "https://getfirebug.com/releases/lite/<majorVersion>/" -
<publishShortLocation>= "https://getfirebug.com/"
[edit] Cross-Browser Debug Channel
-
<compressed>= false -
<fileName>= "firebug-lite-debug.js" -
<fileLocation>= "/lite/branches/firebug<majorVersion>/build/" -
<skinLocation>= "https://getfirebug.com/releases/lite/latest/skin/xp/" -
<publishChannelLocation>= "https://getfirebug.com/releases/lite/latest/" -
<publishVersionLocation>= "https://getfirebug.com/releases/lite/<majorVersion>/" -
<publishShortLocation>= "https://getfirebug.com/"
[edit] Cross-Browser Beta Channel
-
<compressed>= false -
<fileName>= "firebug-lite-beta.js" -
<fileLocation>= "/lite/branches/firebug<majorVersion>/build/" -
<skinLocation>= "https://getfirebug.com/releases/lite/beta/skin/xp/" -
<publishChannelLocation>= "https://getfirebug.com/releases/lite/beta/" -
<publishVersionLocation>= "https://getfirebug.com/releases/lite/<majorVersion>/" -
<publishShortLocation>= "https://getfirebug.com/"
[edit] Chrome Extension Stable Channel
-
<compressed>= false -
<fileName>= "firebug-lite.js" -
<fileLocation>= "/lite/branches/firebug<majorVersion>/build/chrome-extension/" -
<skinLocation>= "chrome-extension://bmagokdooijbeehmkpknfglimnifench/skin/xp/" -
<publishChannelLocation>= Chrome Extension Gallery -
<publishVersionLocation>= N/A -
<publishShortLocation>= N/A
[edit] Chrome Extension Beta Channel
-
<compressed>= false -
<fileName>= "firebug-lite-beta.js" -
<fileLocation>= "/lite/branches/firebug<majorVersion>/build/chrome-extension-beta/" -
<skinLocation>= "chrome-extension://mdaojmoeahmmokaflgbannaopagamgoj/skin/xp/" -
<publishChannelLocation>= "https://getfirebug.com/releases/lite/chrome/beta/" -
<publishVersionLocation>= N/A -
<publishShortLocation>= N/A
[edit] Build Process
[edit] Stage 1. Build application
- process the built-in skin
- compress skin HTML
- compress skin CSS
- replace URLs located in the skin CSS with the correct <skinLocation> depending on the release channel
- Combine the processed HTML and CSS into a single file, that should look like the chromeSkin.js file.
- update version number in:
- lib.js
- firebug.js
- combine all JavaScript files into one, following the order defined in firebug-lite-dev.js. The chromeSkin.js file should be the penultimate file, and the last one should be the bootstrap.js which is just a call to FBL.initialize()
- if it is a stable channel (stable or chrome-stable) then compress JavaScript
- save the file with the
<fileName>name, in the<fileLocation>directory.
[edit] Stage 2. Save progress
- commit files
- update changelog with date and revision number
[edit] Stage 3. Build package
[edit] Build cross-browser Firebug Lite package
- If exists, remove the "./firebug-lite/" directory
- If exists, remove the "./pub/" directory
- svn export "/lite/branches/firebug
<majorVersion>/" repository to a new "./firebug-lite" directory - Create a "./pub/" directory which will be used to upload release to getfirebug.com
- Copy entire "./firebug-lite/skin/" directory to "./pub/"
- Copy "./firebug-lite/content/changelog.txt" file to "./pub/"
- Copy "./firebug-lite/build/*.js" files to "./pub/"
- Compress the whole "./firebug-lite/" directory into a file located at the "./pub/" directory, which means "./pub/firebug-lite.tar.tgz"
- Remove the "./firebug-lite/" directory
[edit] Build Firebug Lite for Google Chrome package
- need to build and commit cross-browser app first in order to get the revision number
- copy /lite/branches/firebug
<majorVersion>/build/<fileName>to chrome extension's<fileLocation> - update version number / revision number in:
- background.html
- 2 places in manifest.json
[edit] Stage 4. Publish
[edit] Publish cross-browser Firebug Lite application
- Copy "./pub/changelog.txt" file to
<publishVersionLocation> - Copy "./pub/firebug-lite.tar.tgz" file to
<publishVersionLocation> - Copy "./pub/*.js" files to
<publishVersionLocation> - Copy "./pub/skin" directory to
<publishVersionLocation> - Repeat the same steps, but using
<publishChannelLocation>instead of<publishVersionLocation> - Commit
[edit] Publish Firebug Lite for Google Chrome extension
[edit] Publish Firebug Lite for Google Chrome Stable
- svn export the
<fileLocation>directory to a temporary location - compress the directory to a .zip file.
- publish the .zip file to Chrome Developer dashboard
[edit] Publish Firebug Lite for Google Chrome Beta
- svn export the
<fileLocation>directory to a temporary location - use Chrome built-in tool to generate .crx file using the proper private key.
- copy .crx file to
<publishChannelLocation> - edit the version number in "
<publishChannelLocation>/updates.xml" - commit
[edit] Stage 5. Celebrate
- write blog post
- write message on the list for comments
- edit link to the list in the blog post
- have fun! :)