Home

Awesome

PowerShell DevOps

Xeno Innovations' DevOps (Development Operations) command line tool provides users a quick-set of Git command helpers and project configs to increase your productivity via PowerShell.

The Git helpers provide shortcuts for popular commands such as, gitpull, gitpush, gitcommit, so you don't have to remember switches. Also provides, gitsync, which synchronizes your current branch with develop (by default) or a branch of our choosing.

The devops command provides project configurations to ensure all projects stay aligned with the same ruleset.

Since our primary focus is on projects made with Visual Studio and VS Code, the rule sets cover a wide range of C# for Xamarin/MAUI, desktop and ASP.NET Core, as well as C/C++ (including Arduino).

This project started as an internal tool used by Xeno Innovations and Suess Labs - hence the focus on git and the default develop branch. We'll do our best to keep things generic for the open source community.

Installation

  1. Download or clone the repo your local folder (i.e. C:\BuildTools\)
  2. Set your Path Environment Variables to your extracted folder.
  3. Close and re-open any open command prompts
  4. Enjoy!

Road map

                      `.---.`             ``.---.
                 `:ohmmNNNNNmho.     `-+osysoo+oyh:
               .ohyo/:---:+ymNNm+ `/shy+:.`     .dm`
             `+h+-`         .+dNNhhs:.          /Nm.
            `ys-             `sNNd.           `oNNo`
           `y+`             /hsdNh`         `+dNd+`
           os`            .hh:`yNo       `:ymNh+.
          .h-            /ms. `dd-  `./ohmdy+-`
          :y`        ```+Nh:-:oNhosyyys+/-`
         `+h/+oo-..    ydNmysosms:-..`
     `:osyhd+/::--...`.dNo` :d/`         .`
   `+hs:-`-h`         /NN+`oh:           s:
  `yd:`   `+`         sNNhhs-           `d-
  /Ns                 oNNm/`            oy`
  +Nm/`            `-ohmNNh.          `oh-
  -hNNdo:.`````.:+ydy/.:dNNNs-`     `/yo.
   .smNNNNNNNNNNmy+-`   .smNNNNdhyyhh+-
     `:+ossso+:-`         `:+syyyo/-`

  -- Xeno Innovations --

GitSync

Synchronizes (merge) your current branch with another branch; using develop by default.

Usage

Syncing your branch with the latest develop branch.

Xeno-DevOps Solution

[feature/MyBranch]> GitSync
Sync complete!

Old Stinky Method

[feature-MyBranch]> git checkout develop
[develop]> git pull
[develop]> git checkout feature-MyBranch
[feature-MyBranch]> git merge develop

GitCheckout

Checks out your branch in the following execution order

  1. Attempt locally
  2. Attempt on origin
  3. Fetch, then try origin again.

Note: In the future we will provide the option for a different remote

Usage

GitCheckout MyBranch
GitCheckout feature/MyBranch
GitCheckout "feature/MyBranch"

GitCommit

Commits changes with provided message. Optionally pushes up branch.

Usage

GitCommit "My message" -push
GitCommit "My message" -push

GitPrune

Fetch and prune your repository.

Usage

GitPrune          ; Fetch and prune

GitPush

Pushes your branch to origin without the annoying prompt when you're not tracking

Usage

GitStatus

Report stats about your current branch

Usage

GitStatus

Results ===========================================
Name                           Value
----                           -----
Branch-Name:                   feature/VsTemplates
Ahead-Count:                   0
Ahead:                         False
Untracked:                     False
Added-Files:                   0
Modified-Files:                0
Deleted:                       1
GitStatus completed.

PowerShell

Execution Policies

get-executionpolicy

get-executionpolicy -list

get-executionpolicy -scope currentuser

Sets a policy Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

References

Sponsored by, Suess Labs