Skip to content
This repository has been archived by the owner on Oct 25, 2022. It is now read-only.

Commit

Permalink
Version from last commit date
Browse files Browse the repository at this point in the history
Set the Version to the last commit date to know when there is a new version that can change the result
  • Loading branch information
tunisiano187 authored Aug 18, 2020
1 parent 43216f1 commit 25d01d0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,16 @@ param(
[switch] $Clean,

# Do not build chocolatey package
[switch] $NoChocoPackage
[switch] $NoChocoPackage,

# Date from last commit
[switch] $LastCommitDate
)

$b = {
if ($Clean) { git clean -Xfd -e vars.ps1; return }
if ($ShortVersion) { $Version = [string] $Version = [Version](Get-Date).ToUniversalTime().ToString("yyyy.M.d") }
if ($LastCommitDate) { $Version = [string] $Version = [Version]$(git log -1 --date=short)[3].split(' ')[-1].replace("-",".") }

$module_path = "$PSScriptRoot/AU"
$module_name = Split-Path -Leaf $module_path
Expand Down

0 comments on commit 25d01d0

Please sign in to comment.