Select to view content in your preferred language

How to set the building date of the AddIn ?

719
2
Jump to solution
05-04-2023 06:50 AM
xavierlhomme
Regular Contributor

Hi 

 I use GitLab CI/CD in order to build the product version of an ArcGIS Pro AddIn. 

 Is It possible to change de DAML Date automatically in order to set the Date as the builing Date ?   

Best Regards

 

Xavier Lhomme
GIS Architect / ESIRI Expert
0 Kudos
1 Solution

Accepted Solutions
xavierlhomme
Regular Contributor

Thanks

Effectively, a small powershell script could do the job :

$xmlPath = "Config.daml"

$xml = Get-Content -Path $xmlPath

$currentDate = Get-Date -Format "M/d/yyyy h:mm:ss tt"

$xml = $xml -replace '<Date>.*?</Date>', "<Date>$currentDate</Date>"

Set-Content -Path $xmlPath -Value $xml

 

 

 

Xavier Lhomme
GIS Architect / ESIRI Expert

View solution in original post

2 Replies
GKmieliauskas
Esri Regular Contributor

Hi,

I have written small executable which changes date and version of add-in. Argument of executable is project path.  Executable searches catalog for daml file and makes changes. You can set in project settings Pre-build event:

"..\UpdateAddInDate\bin\Release\UpdateAddInDate.exe" $(ProjectPath)

 UpdateAddInDate.exe is my executable. Project of executable is located in the same solution with add-in

xavierlhomme
Regular Contributor

Thanks

Effectively, a small powershell script could do the job :

$xmlPath = "Config.daml"

$xml = Get-Content -Path $xmlPath

$currentDate = Get-Date -Format "M/d/yyyy h:mm:ss tt"

$xml = $xml -replace '<Date>.*?</Date>', "<Date>$currentDate</Date>"

Set-Content -Path $xmlPath -Value $xml

 

 

 

Xavier Lhomme
GIS Architect / ESIRI Expert