From f980144072fbfc488960619a79b598dd7576a6fb Mon Sep 17 00:00:00 2001 From: Milan Date: Sat, 21 Oct 2017 12:10:46 +0200 Subject: [PATCH] Better Timestamp readability + Description Fallback Time stamp will now be reported as Updated to v2-84 at 10/21/2017 9:53:56 AM UTC instead of the Updated to v2-84 at 2017-10-21T09:53:56.0000000Z Description fallback will make it so that if there's no commit description it'll put a message instead of the variable name. Before: $(appveyor_repo_commit_message_extended) After: No description was added to this commit --- appveyor.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 27f9bfe3..9207205a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -2,6 +2,8 @@ version: v2-{build} environment: # It's prefered to have the GithubAuthToken (encrypted) set in the UI. Follow this guide for the instructions https://www.appveyor.com/docs/deployment/github/#provider-settings. + CommitTimestamp: 0 + CommitDescription: "No description was added to this commit" CYG_MIRROR: http://cygwin.mirror.constant.com CYG_PACKAGES: bash,php,dos2unix matrix: @@ -32,6 +34,8 @@ init: # Install needed build dependencies install: + - if defined appveyor_repo_commit_message_extended (set CommitDescription=%appveyor_repo_commit_message_extended%) # If there's is a description set it to that, otherwise leave it. + - ps: $env:CommitTimestamp=[System.DateTime]::UtcNow # Readable timestamp - ps: if (Test-Path Env:\CYG_ROOT) { Start-FileDownload "http://cygwin.com/$env:CYG_SETUP" -FileName "cygsetup.exe" -Timeout 30000 } - ps: if ((Get-Content "cygsetup.exe") -eq $Null) { Copy-Item "$env:CYG_SETUP" -Destination "cygsetup.exe" -Force } else { Copy-Item "cygsetup.exe" -Destination "$env:CYG_SETUP" -Force } # Quiet-mode isn't really working but this does work. @@ -58,7 +62,7 @@ deploy: tag: "AppVeyor" # Release needs to be the same otherwise it won't overwrite. release: "Graphic Packs Latest Release" - description: "Updated to **$(appveyor_build_version)** at $(appveyor_repo_commit_timestamp)\n\n### Changelog:\n**$(appveyor_repo_commit_message)** - Commit $(appveyor_repo_commit) by $(appveyor_repo_commit_author):\n```\n$(appveyor_repo_commit_message_extended)\n```\n#### [Installation instructions](https://$(appveyor_account_name).github.io/$(appveyor_project_name)/)" + description: "Updated to **$(appveyor_build_version)** at $(CommitTime)\n\n### Changelog:\n**$(appveyor_repo_commit_message)** - Commit $(appveyor_repo_commit) by $(appveyor_repo_commit_author):\n```\n$(CommitDescription)\n```\n#### [Installation instructions](https://$(appveyor_account_name).github.io/$(appveyor_project_name)/)" provider: GitHub # Auth token is generated by using https://www.appveyor.com/docs/deployment/github/#provider-settings auth_token: $(GithubAuthToken)