Last active
          May 28, 2018 06:00 
        
      - 
      
- 
        Save kenglxn/370e95225bffaf92ac58c4675639491d to your computer and use it in GitHub Desktop. 
    ao feature branch util function
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | function mk_f_branch | |
| if test (count $argv) -eq 2 | |
| set jira $argv[1] | |
| set prefix $argv[2] | |
| set env_name (echo utv-$prefix-$jira | tr '[:upper:]' '[:lower:]') | |
| pushd ~/dev/git/sirius | |
| echo "Creating new feature branch for $env_name" | |
| echo "-> Performing AO login" | |
| ao login sirius | |
| echo "-> Pulling from remote" | |
| git pull | |
| echo "-> Copy feature branch from 'utv-feature-mal' template" | |
| mkdir $env_name | |
| cp -r utv-feature-mal/*.json $env_name/. | |
| git add $env_name | |
| git commit -m "Oppretter miljø for "$jira | |
| git push | |
| echo "-> Performing AO deploy" | |
| ao deploy $env_name | |
| popd | |
| else | |
| echo "create new feature branch environment on aurora openshift" | |
| echo "" | |
| echo "usage:" | |
| echo "mk_f_branch <JIRA-ID> <feature|bugfix>" | |
| end | |
| end | 
      
      
  Author
  
  
        
      
            kenglxn
  
      
      
      commented 
        Apr 10, 2018 
      
    
  
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment