Permalink
Browse files

Updated the start new exercise script

  • Loading branch information...
1 parent 3d564c0 commit b34b00663071af98cd9b7912aafc61ce8910547e Jean-Paul S. Boodhoo committed Jan 31, 2011
Showing with 11 additions and 61 deletions.
  1. +3 −28 push_latest_work.ps1
  2. +8 −33 start_new_exercise.ps1
View
@@ -1,29 +1,4 @@
-param($message)
+git add -A
+git commit -m "Pushing new changes"
+git push origin
-function get_commit_message($passed_in_at_command_line)
-{
- $commit_message = $passed_in_at_command_line
-
- if ($commit_message -eq $null)
- {
- write-host "Please enter a commit message (leave blank to exit):"
- $commit_message = read-host
- }
- return $commit_message
-}
-
-function format_time_as_new_branch_name
-{
- "$($now.year)$($now.month)$($now.day)$($now.hour)$($now.minute)"
-}
-
-function push_up($commit_message)
-{
- git add -A
- git commit -m $commit_message
- git push origin
-}
-
-$commit_message = get_commit_message($message)
-if ($commit_message -eq [String]::empty) {exit}
-push_up($commit_message)
View
@@ -1,33 +1,8 @@
-param($message)
-
-function get_commit_message($passed_in_at_command_line)
-{
- $commit_message = $passed_in_at_command_line
-
- if ($commit_message -eq $null)
- {
- write-host "Please enter a commit message (leave blank to exit):"
- $commit_message = read-host
- }
- return $commit_message
-}
-
-function format_time_as_new_branch_name
-{
- "$($now.year)$($now.month)$($now.day)$($now.hour)$($now.minute)"
-}
-
-function get_latest_on_new_branch($branch_name,$commit_message)
-{
- git add -A
- git commit -m $commit_message
- git checkout master
- git checkout -b $branch_name
- git pull jp master
-}
-
-$commit_message = get_commit_message($message)
-if ($commit_message -eq [String]::empty) {exit}
-$new_branch_name = format_time_as_new_branch_name
-get_latest_on_new_branch($new_branch_name,$commit_message)
-echo "new branch name:$new_branch_name message:$commit_message"
+$now = get-date
+$new_branch_name = "$($now.year)$($now.month.tostring("00"))$($now.day.tostring("00"))$($now.hour.tostring("00"))$($now.minute.tostring("00"))"
+git add -A
+git commit -m "Committing"
+git checkout master
+git checkout -b $new_branch_name
+git pull jp master
+echo "new branch name:$new_branch_name"

0 comments on commit b34b006

Please sign in to comment.