Skip to content

Commit

Permalink
Revert "Curl versioning changes" (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
prashant-shahi committed Sep 10, 2019
1 parent b35c8b6 commit aea28d2
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions layouts/partials/example-curl.html
@@ -1,12 +1,11 @@
{{ $currentBranch := getenv "CURRENT_BRANCH" }}

{{ $version := replaceRE "[a-zA-Z]+" "" $currentBranch }}
{{ $versionMap := split (replace (printf "%-10s" $version) " " "0") "." }}
{{ $majorVersion := int (index $versionMap 0) }}
{{ $minorVersion := int (index $versionMap 1) }}
{{ $patchVersion := int (index $versionMap 2) }}
{{ $version := split (slicestr (replace (printf "%-14s" $currentBranch) " " "0") 9) "." }}
{{ $majorVersion := int (index $version 0) }}
{{ $minorVersion := int (index $version 1) }}
{{ $patchVersion := int (index $version 2) }}

{{ $versionGe11 := or (eq $currentBranch "master") (gt $majorVersion 1) (and (eq $majorVersion 1) (ge $minorVersion 1)) }}
{{ $versionGe11 := or (eq $currentBranch "master") (gt $majorVersion 1) (and (eq $majorVersion 1) (gt $minorVersion 1)) }}

{{ if $versionGe11 }}
{{ if eq ( .Vars ) nil }}
Expand Down

0 comments on commit aea28d2

Please sign in to comment.