Skip to content

Commit

Permalink
Merge branch 'release/0.5.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
Gregg8 committed May 7, 2015
2 parents 23776fa + 8645448 commit 35a339b
Show file tree
Hide file tree
Showing 21 changed files with 487 additions and 327 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ re-com is available from clojars. Add it to your project.clj dependencies:

[![Clojars Project](http://clojars.org/re-com/latest-version.svg)](http://clojars.org/re-com)

You'll then need to include these asset folders in your app:
https://github.com/Day8/re-com/tree/master/run/resources/public/assets

As far as your `index.html` is concerned, take inspiration from here:
https://github.com/Day8/re-com/tree/master/run/resources/public
Expand All @@ -182,14 +184,20 @@ In particular, you'll need bootstrap (assumedly via a CDN):
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.2.0/css/bootstrap.css">
```

You'll then need these assets, including the re-com.css:
https://github.com/Day8/re-com/tree/master/run/resources/public/assets
And a reference to these two CSS files:

```html
<link rel="stylesheet" href="assets/css/material-design-iconic-font.min.css">
<link rel="stylesheet" href="assets/css/re-com.css">
```

And a reference to the Roboto fonts (but this can be overridden relatively easily):

```html
<link href="http://fonts.googleapis.com/css?family=Roboto:300,400,500,700,400italic" rel="stylesheet" type="text/css">
<link href='http://fonts.googleapis.com/css?family=Roboto+Condensed:400,300' rel='stylesheet' type='text/css'>
```

Reagent comes bundled with a matching version of ReactJS,
so you don't need to include it explicitly.

Expand Down
105 changes: 105 additions & 0 deletions docs/release-procedure.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# Re-com Release Procedure

## Setting your environment up

A number of things need to be set up before the release procedure can commence.

### GPG

Here are the basic instructions to follow to get GPG running: https://github.com/technomancy/leiningen/blob/stable/doc/GPG.md

A few notes for Windows:

- The recommended gpg version for windows is: http://www.gpg4win.org.
- There are several version on the download page. I used the "Vanilla" one. Direct link: http://files.gpg4win.org/gpg4win-vanilla-2.2.4.exe
- To display your public key, just type: `gpg --export -a`.

### Clojars

Simply need to set up your own account, then get the Day8 Clojars admin to add you to the family. Then you can publish to Day8 Clojars.

Note that your GPG public key from above needs to be pasted into your Clojars profile for this process to work.

More info on deploying libraries using lein: https://github.com/technomancy/leiningen/blob/master/doc/DEPLOY.md

## Release Steps

### Build library and test the demo

Note that all these commands are entered at the repo root folder.

- [ ] Close all auto-compiles (command line and/or IntelliJ).
- [ ] Build each of these aliases (will require separate terminals for each):
- `lein debug`
- `lein debug-prod`
- `lein debug-test`
- [ ] For `dev` and `prod`, run through each demo page and make sure no errors or debug output appears in the console.
- [ ] For `test`, make sure all tests pass. Modify code/tests until all tests pass.
- [ ] Close all auto-compiles again.

### Make a Github release

- [ ] TODO: IntelliJ should be able to do all of these steps as it has integrated gitflow - investigate.
- [ ] Make sure your master branch is up-to-date with Github (in 99% of cases it will be):
- `git checkout master` (TODO: might have to shelve develop or feature branch outstanding changes - confirm).
- `git pull`
- `git checkout {the branch you are working in}`
- [ ] Start a new release:
- `git checkout develop` (TODO: may just need to be in the branch you are working in - confirm).
- `git flow release start x.x.x`
- A branch called 'release/x.x.x' is created.
- [ ] Bump version in project.clj to `x.x.x`.
- [ ] Update README.md file if required.
- [ ] Commit to develop or finish feature:
- `git commit -a -m "..."`
- [ ] Push develop to GitHub:
- `git push`
- [ ] Finish the release:
- `git flow release finish 'x.x.x'`
- Merges develop into master.
- Creates a tag with that version number.
- Pops up an editor to describe the release. I just put "Version x.x.x".
- Deletes the release branch.
- [ ] Push develop to GitHub:
- `git push`
- [ ] Go to master branch:
- `git checkout master`
- [ ] Push master to GitHub:
- `git push`
- [ ] Push the tags to GitHub:
- `git push --tags`
- [ ] Create a GitHub Release:
- Go to: https://github.com/Day8/re-com/releases
- Should see your version `x.x.x` tag at the top.
- Press the `Draft a new release` button.
- Select this new `x.x.x` version in the Tag version dropdown.
- Make sure this is based on a Target of master.
- For the title, enter the version number: `x.x.x`.
- Enter a description that includes a list of "Changes" and "Fixes" (since the last release).
- Click the `Publish release` button.

### Push library to Clojars

- [ ] Push this release to Clojars:
- `lein deploy clojars`
- Will prompt for your Clojars username and password.
- Will also prompt for your GPG passphrase.
- [ ] "Promote" the Clojars release:
- Go to the re-com Clojars page for this version: https://clojars.org/re-com
- Log in.
- Click on the link for this new version.
- Click the big blue button at the bottom of the release page to make it live.

### Deploy demo to AWS

- [ ] Deploy demo to AWS:
- `lein s3-static-deploy`
- Could have used `lein deploy-aws` but this also builds the `prod` version which we have already just built.
- Manually change `index.html` to `index_prod.html` in S3 Browser. TODO: Find a way to automate this.
- Test it: http://re-demo.s3-website-ap-southeast-2.amazonaws.com.

### Final tasks

- [ ] Reply to all issues and pull requests relating to this release.
- [ ] Post a note in #re-com Slack channel pointing to GitHub release page.
- [ ] Post to Google Groups if necessary.
2 changes: 1 addition & 1 deletion project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

;; ---------------------------------------------------------------------------------------

(defproject re-com "0.5.3"
(defproject re-com "0.5.4"
:description "Reusable UI components for Reagent"
:url "https://github.com/Day8/re-com.git"
:license {:name "MIT"}
Expand Down
4 changes: 2 additions & 2 deletions src/re_com/alert.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
{:name :body :required false :type "string | hiccup" :validate-fn string-or-hiccup? :description "displayed within the body of the alert"}
{:name :padding :required false :default "15px" :type "string" :validate-fn string? :description "padding surounding the alert"}
{:name :closeable? :required false :default false :type "boolean" :description [:span "if true, render a close button. " [:code ":on-close"] " should be supplied"]}
{:name :on-close :required false :type "(:id) -> nil" :validate-fn fn? :description [:span "called when the user clicks the close 'X' button. Passed the " [:code ":id"] " of the alert to close"]}
{:name :on-close :required false :type ":id -> nil" :validate-fn fn? :description [:span "called when the user clicks the close 'X' button. Passed the " [:code ":id"] " of the alert to close"]}
{:name :class :required false :type "string" :validate-fn string? :description "CSS classes (whitespace separated). Applied to outer container"}
{:name :style :required false :type "CSS style map" :validate-fn css-style? :description "CSS styles. Applied to outer container"}
{:name :attr :required false :type "HTML attr map" :validate-fn html-attr? :description [:span "HTML attributes, like " [:code ":on-mouse-move"] [:br] "No " [:code ":class"] " or " [:code ":style"] "allowed. Applied to outer container"]}])
Expand Down Expand Up @@ -66,7 +66,7 @@

(def alert-list-args-desc
[{:name :alerts :required true :type "vector of maps | atom" :validate-fn vector-of-maps? :description "alerts to render (in the order supplied). Can also be a list of maps"}
{:name :on-close :required true :type "(:id) -> nil" :validate-fn fn? :description [:span "called when the user clicks the close 'X' button. Passed the alert's " [:code ":id"]]}
{:name :on-close :required true :type ":id -> nil" :validate-fn fn? :description [:span "called when the user clicks the close 'X' button. Passed the alert's " [:code ":id"]]}
{:name :max-height :required false :type "string" :validate-fn string? :description "CSS style for maximum list height. By default, it grows forever"}
{:name :padding :required false :default "4px" :type "string" :validate-fn string? :description "CSS padding within the alert"}
{:name :border-style :required false :default "1px solid lightgrey" :type "string" :validate-fn string? :description "CSS border style surrounding the list"}
Expand Down
4 changes: 2 additions & 2 deletions src/re_com/box.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@
style)
gap-form (when gap [re-com.box/gap
:size gap
:width gap]) ;; required to get around a Chrome bug
:width gap]) ;; TODO: required to get around a Chrome bug: https://code.google.com/p/chromium/issues/detail?id=423112. Remove once fixed.
children (if gap
(interpose gap-form (filter identity children)) ;; filter is to remove possible nils so we don't add unwanted gaps
children)]
Expand Down Expand Up @@ -316,7 +316,7 @@
style)
gap-form (when gap [re-com.box/gap
:size gap
:height gap]) ;; required to get around a Chrome bug
:height gap]) ;; TODO: required to get around a Chrome bug: https://code.google.com/p/chromium/issues/detail?id=423112. Remove once fixed.
children (if gap
(interpose gap-form (filter identity children)) ;; filter is to remove possible nils so we don't add unwanted gaps
children)]
Expand Down
10 changes: 5 additions & 5 deletions src/re_com/buttons.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
(def button-args-desc
[{:name :label :required true :type "string | hiccup" :validate-fn string-or-hiccup? :description "label for the button"}
{:name :class :required false :type "string" :validate-fn string? :description "CSS class names, space separated"}
{:name :on-click :required false :type "( ) -> nil" :validate-fn fn? :description "called when the button is clicked"}
{:name :on-click :required false :type "-> nil" :validate-fn fn? :description "a function which takes no params and returns nothing. Called when the button is clicked"}
{:name :tooltip :required false :type "string | hiccup" :validate-fn string-or-hiccup? :description "what to show in the tooltip"}
{:name :tooltip-position :required false :default :below-center :type "keyword" :validate-fn position? :description [:span "relative to this anchor. One of " position-options-list]}
{:name :disabled? :required false :default false :type "boolean | atom" :description "if true, the user can't click the button"}
Expand Down Expand Up @@ -64,7 +64,7 @@

(def md-circle-icon-button-args-desc
[{:name :md-icon-name :required true :default "md-add" :type "string" :validate-fn string? :description [:span "the name of the icon." [:br] "For example, " [:code "\"md-add\""] " or " [:code "\"md-undo\""]] }
{:name :on-click :required false :type "( ) -> nil" :validate-fn fn? :description "called when the button is clicked"}
{:name :on-click :required false :type "-> nil" :validate-fn fn? :description "a function which takes no params and returns nothing. Called when the button is clicked"}
{:name :size :required false :default :regular :type "keyword" :validate-fn button-size? :description [:span "one of " button-sizes-list]}
{:name :tooltip :required false :type "string | hiccup" :validate-fn string-or-hiccup? :description "what to show in the tooltip"}
{:name :tooltip-position :required false :default :below-center :type "keyword" :validate-fn position? :description [:span "relative to this anchor. One of " position-options-list]}
Expand Down Expand Up @@ -120,7 +120,7 @@

(def md-icon-button-args-desc
[{:name :md-icon-name :required true :default "md-add" :type "string" :validate-fn string? :description [:span "the name of the icon." [:br] "For example, " [:code "\"md-add\""] " or " [:code "\"md-undo\""]]}
{:name :on-click :required false :type "( ) -> nil" :validate-fn fn? :description "called when the button is clicked"}
{:name :on-click :required false :type "-> nil" :validate-fn fn? :description "a function which takes no params and returns nothing. Called when the button is clicked"}
{:name :size :required false :default :regular :type "keyword" :validate-fn button-size? :description [:span "one of " button-sizes-list]}
{:name :tooltip :required false :type "string | hiccup" :validate-fn string-or-hiccup? :description "what to show in the tooltip"}
{:name :tooltip-position :required false :default :below-center :type "keyword" :validate-fn position? :description [:span "relative to this anchor. One of " position-options-list]}
Expand Down Expand Up @@ -218,7 +218,7 @@

(def row-button-args-desc
[{:name :md-icon-name :required true :default "md-add" :type "string" :validate-fn string? :description [:span "the name of the icon." [:br] "For example, " [:code "\"md-add\""] " or " [:code "\"md-undo\""]]}
{:name :on-click :required false :type "( ) -> nil" :validate-fn fn? :description "called when the button is clicked"}
{:name :on-click :required false :type "-> nil" :validate-fn fn? :description "a function which takes no params and returns nothing. Called when the button is clicked"}
{:name :mouse-over-row? :required false :default false :type "boolean" :description "true if the mouse is hovering over the row"}
{:name :tooltip :required false :type "string | hiccup" :validate-fn string-or-hiccup? :description "what to show in the tooltip"}
{:name :tooltip-position :required false :default :below-center :type "keyword" :validate-fn position? :description [:span "relative to this anchor. One of " position-options-list]}
Expand Down Expand Up @@ -267,7 +267,7 @@

(def hyperlink-args-desc
[{:name :label :required true :type "string | hiccup | atom" :validate-fn string-or-hiccup? :description "label/hiccup for the button"}
{:name :on-click :required false :type "( ) -> nil" :validate-fn fn? :description "called when the button is clicked"}
{:name :on-click :required false :type "-> nil" :validate-fn fn? :description "a function which takes no params and returns nothing. Called when the button is clicked"}
{:name :tooltip :required false :type "string | hiccup" :validate-fn string-or-hiccup? :description "what to show in the tooltip"}
{:name :tooltip-position :required false :default :below-center :type "keyword" :validate-fn position? :description [:span "relative to this anchor. One of " position-options-list]}
{:name :disabled? :required false :default false :type "boolean | atom" :description "if true, the user can't click the button"}
Expand Down
2 changes: 1 addition & 1 deletion src/re_com/datepicker.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@

(def datepicker-args-desc
[{:name :model :required true :type "goog.date.UtcDateTime | atom" :validate-fn goog-date? :description "the selected date. Should match :enabled-days"}
{:name :on-change :required true :type "(goog.date.UtcDateTime) -> nil" :validate-fn fn? :description "called when a new selection is made"}
{:name :on-change :required true :type "goog.date.UtcDateTime -> nil" :validate-fn fn? :description "called when a new selection is made"}
{:name :disabled? :required false :default false :type "boolean | atom" :description "when true, the can't select dates but can navigate"}
{:name :enabled-days :required false :type "set" :validate-fn set? :description "a subset of #{:Su :Mo :Tu :We :Th :Fr :Sa}. Only dates falling on these days will be user-selectable. Default is all 7 days"}
{:name :show-weeks? :required false :default false :type "boolean" :description "when true, week numbers are shown to the left"}
Expand Down
Loading

0 comments on commit 35a339b

Please sign in to comment.