Skip to content

Commit

Permalink
Merge branch 'stable'
Browse files Browse the repository at this point in the history
  • Loading branch information
heff committed Feb 25, 2014
2 parents 3336f1f + 9c28281 commit 8f40fa4
Showing 1 changed file with 147 additions and 0 deletions.
147 changes: 147 additions & 0 deletions contrib.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
"project": {
"owner": "videojs",
"name": "video.js",
"urls": {
"git": "https://github.com/videojs/video.js.git"
},
"requirements": [
{
"name": "git",
Expand All @@ -16,13 +19,157 @@
]
},

"install": {
"steps": [
{
"desc": "Get all git branches",
"exec": "git fetch origin"
},
{
"desc": "Create the stable branch for patches",
"exec": "git checkout -b stable origin/stable"
},
{
"desc": "Add the upstream project as a remote so new changes can be pulled",
"exec": "git remote add upstream <%= project.urls.git %>"
},
{
"desc": "Get all upstream branches and changes",
"exec": "git fetch upstream"
},
{
"contrib": "update"
}
]
},

"update": {
"steps": [
{
"desc": "Switch to the development branch",
"exec": "git checkout master"
},
{
"desc": "Get any changes to master in the main project",
"exec": "git pull upstream master"
},
{
"desc": "Switch to the release branch",
"exec": "git checkout stable"
},
{
"desc": "Get any changes to stable in the main project",
"exec": "git pull upstream stable"
},
{
"desc": "Install dependencies",
"exec": "npm install"
},
{
"desc": "Build the distribution",
"exec": "grunt"
}
]
},

"test": {
"desc": "Run automated tests",
"steps": ["grunt test"]
},

"contributions": {

"patch": {
"desc": "Urgent fixes for the latest stable version",
"new": {
"desc": "Start a new patch",
"steps": [
{
"id": "name",
"desc": "Name the patch branch",
"prompt": {
"type": "text",
"message": "name"
}
},
{
"desc": "Check out the release branch and get any updates",
"exec": "git checkout stable && git pull upstream stable"
},
{
"desc": "Create the patch branch",
"exec": "git checkout -b patch/<%= name %>"
},
{
"desc": "Push the branch to the origin repo",
"exec": "git push -u origin patch/<%= name %>"
}
]
},
"submit": {
"desc": "Submit a pull request for a patch when it's finished",
"steps": [
{
"desc": "Run tests",
"contrib": "test"
},
{
"desc": "Check for any unadded changes",
"exec": "git diff --exit-code",
"fail": "Add and commit all changes before submitting a pull request"
},
{
"desc": "Check for any uncomitted changes",
"exec": "git diff --cached --exit-code",
"fail": "Add and commit all changes before submitting a pull request"
},
{
"id": "branch",
"desc": "Which branch should be submitted? (e.g. 'patch/my-patch')",
"prompt": {
"type": "text",
"message": "branch"
}
},
{
"id": "user",
"desc": "Which github user or org are you submitting from?",
"prompt": {
"type": "text",
"message": "user"
}
},
{
"desc": "Open the github pull request page",
"open": "https://github.com/videojs/video.js/compare/videojs:stable...<%= user %>:<%= branch %>"
}
]
},
"delete": {
"desc": "Delete the current patch branch",
"steps": [
{
"id": "name",
"guide": false,
"desc": "Get the current branch name",
"exec": "git rev-parse --abbrev-ref HEAD"
},
{
"desc": "Confirm you are deleting the correct branch",
"prompt": "Delete branch '<%= name %>'?"
},
{
"desc": "Delete the local copy of the branch",
"exec": "git branch -D <%= name %>"
},
{
"desc": "Delete the remote copy of the branch",
"exec": "git push origin :<%= name %>"
}
]
}
},

"release": {
"desc": "Create and publish a release",
"steps": [
Expand Down

0 comments on commit 8f40fa4

Please sign in to comment.