Skip to content

Commit

Permalink
Merge branch 'release/1.0.0'
Browse files Browse the repository at this point in the history
* release/1.0.0: (65 commits)
  (version) v1.0.0
  (#2443) Fix misspellings for profile text
  (#2468) Remove choco update command
  (#2468) Remove choco version command
  (#2602) Add 1.0.0 of shimgen and update shims
  (#89) Remove cpack shims on package upgrades
  (#89) Remove cpack shim for choco pack
  (maint) Update deprecation notice for config settings
  (build) Additional tweaks to version numbers
  (build) Add SolutionVersion.cs file to artifacts
  (docs) Update committers docs with correct/fixed links
  (build) Minor tweaks to build files
  (#2615) Reference CREDITS file for other licenses
  (build) Refactor Nuget Upload
  (build) Added missing Kotlin import
  (maint) Whitespace
  (#2614) Update 7zip / Shimgen licenses
  (#2614) Update project  contributors
  (#2641) Minor tweaks to wording and formatting
  (#2462) Remove mention of alias for search comand
  ...
  • Loading branch information
gep13 committed Mar 18, 2022
2 parents 947efb7 + 878a2e0 commit 5c9117a
Show file tree
Hide file tree
Showing 93 changed files with 1,548 additions and 986 deletions.
62 changes: 37 additions & 25 deletions .build.custom/codeSign.step
Original file line number Diff line number Diff line change
Expand Up @@ -26,48 +26,49 @@
</target>

<target name="get_password" if="${property::exists('path.code.cert.password')}">
<loadfile file="${path.code.cert.password}" property="code.cert.password" if="${file::exists(path.code.cert.password)}" />
<loadfile file="${path.code.cert.password}" property="code.cert.password" if="${not run.teamcity and file::exists(path.code.cert.password)}" />
<property name="code.cert.password" value="${string::trim(code.cert.password)}" />
</target>

<!--
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\signtool.exe sign /t http://timestamp.digicert.com /fd SHA1 /f %CHOCOLATEY_OFFICIAL_CERT% /p [INSERT] /a "code_drop\chocolatey\console\choco.exe"
-->

<target name="sign_assemblies" description="Signs the final assembly prior to packaging it up." if="${file::exists(app.signtool) and property::exists('path.code.cert')}">
<target name="sign_assemblies" description="Signs the final assembly prior to packaging it up." if="${file::exists(app.signtool) and msbuild.configuration == 'ReleaseOfficial'}">
<property name="app.choco.nuget" value="${dirs.drop.nuget}${path.separator}chocolatey${path.separator}tools${path.separator}chocolateyInstall${path.separator}choco.exe" />
<property name="lib.choco.nuget" value="${dirs.drop.nuget}${path.separator}chocolatey.lib${path.separator}lib${path.separator}chocolatey.dll" />
<property name="code.signing.args" value='/f "${path.code.cert}" /p "${code.cert.password}"' if="${property::exists('path.code.cert') and property::exists('code.cert.password')}" />
<property name="code.signing.args" value='/sm /n "${code.cert.subjectname}"' if="${run.teamcity}" />

<echo level="Warning" message="Signing the assemblies using ${app.signtool}." />
<property name="app.choco" value="${dirs.drop}${path.separator}chocolatey${path.separator}console${path.separator}choco.exe" />
<property name="lib.choco" value="${dirs.drop}${path.separator}chocolatey${path.separator}lib${path.separator}chocolatey.dll" />

<echo message='"${app.signtool}" sign /t "${code.cert.timestampserver}" /fd ${code.cert.algorithm} /f ${path.code.cert} /p [REDACTED] /a "${app.choco}"' />
<exec
program="${app.signtool}"
commandline='sign /t "${code.cert.timestampserver}" /fd ${code.cert.algorithm} /f ${path.code.cert} /p ${code.cert.password} /a "${app.choco}"'
if="${file::exists(app.signtool) and file::exists(path.code.cert)}"
commandline='sign /t "${code.cert.timestampserver}" /fd ${code.cert.algorithm} ${code.signing.args} /a "${app.choco}"'
if="${file::exists(app.signtool) and property::exists('code.signing.args')}"
failonerror="true"
/>

<exec
program="${app.signtool}"
commandline='sign /t "${code.cert.timestampserver}" /fd ${code.cert.algorithm} /f ${path.code.cert} /p ${code.cert.password} /a "${lib.choco}"'
if="${file::exists(app.signtool) and file::exists(path.code.cert)}"
commandline='sign /t "${code.cert.timestampserver}" /fd ${code.cert.algorithm} ${code.signing.args} /a "${lib.choco}"'
if="${file::exists(app.signtool) and property::exists('code.signing.args')}"
failonerror="true"
/>

<property name="app.choco.nuget" value="${dirs.drop.nuget}${path.separator}chocolatey${path.separator}tools${path.separator}chocolateyInstall${path.separator}choco.exe" />
<property name="lib.choco.nuget" value="${dirs.drop.nuget}${path.separator}chocolatey.lib${path.separator}lib${path.separator}chocolatey.dll" />

<exec
program="${app.signtool}"
commandline='sign /t "${code.cert.timestampserver}" /fd ${code.cert.algorithm} /f ${path.code.cert} /p ${code.cert.password} /a "${app.choco.nuget}"'
if="${file::exists(app.signtool) and file::exists(path.code.cert) and run.nuget}"
commandline='sign /t "${code.cert.timestampserver}" /fd ${code.cert.algorithm} ${code.signing.args} /a "${app.choco.nuget}"'
if="${file::exists(app.signtool) and property::exists('code.signing.args') and run.nuget}"
failonerror="true"
/>

<exec
program="${app.signtool}"
commandline='sign /t "${code.cert.timestampserver}" /fd ${code.cert.algorithm} /f ${path.code.cert} /p ${code.cert.password} /a "${lib.choco.nuget}"'
if="${file::exists(app.signtool) and file::exists(path.code.cert) and run.nuget}"
commandline='sign /t "${code.cert.timestampserver}" /fd ${code.cert.algorithm} ${code.signing.args} /a "${lib.choco.nuget}"'
if="${file::exists(app.signtool) and property::exists('code.signing.args') and run.nuget}"
failonerror="true"
/>

Expand All @@ -80,8 +81,8 @@ C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\signtool.exe sign /t htt
<do>
<exec
program="${app.signtool}"
commandline='sign /t "${code.cert.timestampserver}" /fd ${code.cert.algorithm} /f ${path.code.cert} /p ${code.cert.password} /a "${shim.filename}"'
if="${file::exists(app.signtool) and file::exists(path.code.cert) and run.nuget}"
commandline='sign /t "${code.cert.timestampserver}" /fd ${code.cert.algorithm} ${code.signing.args} /a "${shim.filename}"'
if="${file::exists(app.signtool) and property::exists('code.signing.args') and run.nuget}"
failonerror="true"
/>
</do>
Expand All @@ -98,8 +99,8 @@ C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\signtool.exe sign /t htt
<do>
<exec
program="${app.signtool}"
commandline='sign /t "${code.cert.timestampserver}" /fd ${code.cert.algorithm} /f ${path.code.cert} /p ${code.cert.password} /a "${tools.filename}"'
if="${file::exists(app.signtool) and file::exists(path.code.cert) and run.nuget}"
commandline='sign /t "${code.cert.timestampserver}" /fd ${code.cert.algorithm} ${code.signing.args} /a "${tools.filename}"'
if="${file::exists(app.signtool) and property::exists('code.signing.args') and run.nuget}"
failonerror="true"
/>
</do>
Expand All @@ -113,7 +114,7 @@ $cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate
Set-AuthenticodeSignature -Filepath @("C:\ProgramData\chocolatey\helpers\chocolateyInstaller.psm1","C:\ProgramData\chocolatey\helpers\chocolateyProfile.psm1") -Cert $cert -TimeStampServer "http://timestamp.digicert.com" -IncludeChain NotRoot -HashAlgorithm SHA256
-->

<target name="sign_powershell_files" description="Signs the final PowerShell files prior to packaging them up." if="${file::exists(app.powershell) and property::exists('path.code.cert')}">
<target name="sign_powershell_files" description="Signs the final PowerShell files prior to packaging them up." if="${file::exists(app.powershell) and msbuild.configuration == 'ReleaseOfficial'}">
<echo level="Warning" message="Signing the PowerShell files." />
<property name="apostrophe" value="'" />
<property name="powershell.filenames" value="remove" />
Expand All @@ -133,11 +134,22 @@ Set-AuthenticodeSignature -Filepath @("C:\ProgramData\chocolatey\helpers\chocola

<echo message="Signing PowerShell files - @(${powershell.filenames})" />

<exec
program="${app.powershell}"
commandline="$cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2('${path.code.cert}', '${code.cert.password}'); Set-AuthenticodeSignature -Filepath @(${powershell.filenames}) -Cert $cert -TimeStampServer '${code.cert.timestampserver}' -IncludeChain NotRoot -HashAlgorithm SHA256"
if="${file::exists(app.powershell) and string::contains(powershell.filenames,',') and file::exists(path.code.cert) and run.nuget}"
failonerror="true"
/>
<if test="${property::exists('path.code.cert')}">
<exec
program="${app.powershell}"
commandline="$cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2('${path.code.cert}', '${code.cert.password}'); Set-AuthenticodeSignature -Filepath @(${powershell.filenames}) -Cert $cert -TimeStampServer '${code.cert.timestampserver}' -IncludeChain NotRoot -HashAlgorithm SHA256"
if="${file::exists(app.powershell) and string::contains(powershell.filenames,',') and file::exists(path.code.cert) and run.nuget}"
failonerror="true"
/>
</if>

<if test="${run.teamcity}">
<exec
program="${app.powershell}"
commandline="$cert = Get-ChildItem Cert:\LocalMachine\My | Where-Object Subject -like '*${code.cert.subjectname}*' ; Set-AuthenticodeSignature -Filepath @(${powershell.filenames}) -Cert $cert -TimeStampServer '${code.cert.timestampserver}' -IncludeChain NotRoot -HashAlgorithm SHA256"
if="${file::exists(app.powershell) and string::contains(powershell.filenames,',') and run.nuget}"
failonerror="true"
/>
</if>
</target>
</project>
2 changes: 2 additions & 0 deletions .build/default.build
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,10 @@
<!--<nant buildfile="${dirs.current.file}${path.separator}versioners${path.separator}vss.step" inheritall="true" if="${source_control_type=='vss'}" />-->

<property name="version.revision" value="${environment::get-variable('uc.app.revision')}" if="${environment::variable-exists('uc.app.revision')}" />
<property name="version.revision" value="${version.gitTag}" if="${version.gitTag != ''}" />
<property name="version.hash" value="${environment::get-variable('uc.app.revision.hash')}" if="${environment::variable-exists('uc.app.revision.hash')}" />
<property name="version.hash" value="${version.revision}" if="${version.hash == '0'}" />
<property name="version.hash" value="${version.gitTag}" if="${version.gitTag != ''}" />
<echo level="Warning" message="Using revision number: ${version.revision} and hash: ${version.hash}." />
</target>

Expand Down
5 changes: 4 additions & 1 deletion .build/nugetBuild.step
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
<property name="pkg.build.date" value="20100801" overwrite="false" />
<property name="file.nuget.version" value="${dirs.drop.nuget}${path.separator}version.xml" />
<property name="nuget.version" value="${version.major}.${version.minor}.${version.build}.${version.revision}" />
<property name="nuget.version" value="${version.major}.${version.minor}.${version.patch}" if="${version.use_semanticversioning}" />
<property name="nuget.version" value="${version.major}.${version.minor}.${version.patch}" if="${version.use_semanticversioning}" />
<property name="nuget.version" value="${version.gitTag}" if="${version.gitTag != ''}" />

<property name="fail.build.on.error" value="false" />

Expand Down Expand Up @@ -43,8 +44,10 @@
<property name="nuget.version" value="${nuget.version + '-' + pkg.build.date}" if="${version.use.build_date and version.nuget.prerelease != ''}" />
<property name="nuget.version" value="${nuget.version + '.' + version.fix}" if="${version.fix != '0' and not version.use.build_date}" />
<property name="nuget.version" value="${nuget.version + '-' + version.fix}" if="${version.fix != '0' and version.use.build_date}" />
<property name="nuget.version" value="${version.gitTag}" if="${version.gitTag != ''}" />
<!-- version.use.build_date -->
<echo level="Warning" message="Using ${nuget.version} as the version for the nuget package(s)." />
<echo level="Warning" message="##teamcity[buildNumber '${nuget.version}']" if="${run.teamcity}" />
</target>

<target name="build_nugget">
Expand Down
2 changes: 2 additions & 0 deletions .build/nugetPrepare.step
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@
<property name="nuget.version" value="${nuget.version + '-' + version.nuget.prerelease}" if="${version.nuget.prerelease != ''}" />
<property name="nuget.version" value="${nuget.version + '.' + pkg.build.date}" if="${version.use.build_date and version.use_semanticversioning and version.nuget.prerelease == ''}" />
<property name="nuget.version" value="${nuget.version + '-' + pkg.build.date}" if="${version.use.build_date and version.nuget.prerelease != ''}" />
<property name="nuget.version" value="${version.gitTag}" if="${version.gitTag != ''}" />

<!-- version.use.build_date -->
<echo level="Warning" message="Using ${nuget.version} as the version for the nuget package(s)." />
</target>
Expand Down
1 change: 1 addition & 0 deletions .build/obfuscate.step
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
<target name="get_version">
<property name="version.file" value="${version.major}.${version.minor}.${version.build}.${version.revision}" />
<property name="version.file" value="${version.major}.${version.minor}.${version.patch}.${version.build}" if="${version.use_semanticversioning}" />
<property name="version.file" value="${version.gitTag}.0" if="${version.gitTag != ''}" />
</target>

<target name="get_project_output_files">
Expand Down
4 changes: 3 additions & 1 deletion .build/versionBuilder.step
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,12 @@

<target name="generate_assembly_info" description="Generate assembly info">
<property name="version.assembly" value="${version.major}.${version.minor}.${version.build}.${version.revision}" />
<property name="version.assembly" value="${version.major}.${version.minor}.${version.patch}.${version.fix}" if="${version.use_semanticversioning}" />
<property name="version.assembly" value="${version.major}.${version.minor}.${version.patch}.${version.fix}" if="${version.use_semanticversioning}" />
<property name="version.assembly" value="${version.gitTag}.0" if="${version.gitTag != ''}" />
<echo level="Warning" message="Generating SolutionVersion.${language.short} with assembly version ${version.assembly}." />
<property name="version.file" value="${version.major}.${version.minor}.${version.build}.${version.revision}" />
<property name="version.file" value="${version.major}.${version.minor}.${version.patch}.${version.fix}" if="${version.use_semanticversioning}" />
<property name="version.file" value="${version.gitTag}.0" if="${version.gitTag != ''}" />
<property name="version.product" value="${version.hash}" />
<property name="version.product" value="${version.hash}" if="${version.use_semanticversioning}" />

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
build_output/build.log
# Build on Windows
windows-build:
runs-on: windows-latest
runs-on: windows-2019
steps:
- uses: actions/checkout@v2
- name: Build with .Net Framework
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
build_output/build.log
# Build and test on Windows
windows-build:
runs-on: windows-latest
runs-on: windows-2019
steps:
- uses: actions/checkout@v2
- name: Build with .Net Framework
Expand Down
104 changes: 104 additions & 0 deletions .teamcity/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
<?xml version="1.0"?>
<project>
<modelVersion>4.0.0</modelVersion>
<name>Chocolatey Config DSL Script</name>
<groupId>Chocolatey</groupId>
<artifactId>Chocolatey_dsl</artifactId>
<version>1.0-SNAPSHOT</version>

<parent>
<groupId>org.jetbrains.teamcity</groupId>
<artifactId>configs-dsl-kotlin-parent</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>

<repositories>
<repository>
<id>jetbrains-all</id>
<url>https://download.jetbrains.com/teamcity-repository</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>teamcity-server</id>
<url>https://teamcityserver/app/dsl-plugins-repository</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>

<pluginRepositories>
<pluginRepository>
<id>JetBrains</id>
<url>https://download.jetbrains.com/teamcity-repository</url>
</pluginRepository>
</pluginRepositories>

<build>
<sourceDirectory>${basedir}</sourceDirectory>
<plugins>
<plugin>
<artifactId>kotlin-maven-plugin</artifactId>
<groupId>org.jetbrains.kotlin</groupId>
<version>${kotlin.version}</version>

<configuration/>
<executions>
<execution>
<id>compile</id>
<phase>process-sources</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
<execution>
<id>test-compile</id>
<phase>process-test-sources</phase>
<goals>
<goal>test-compile</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jetbrains.teamcity</groupId>
<artifactId>teamcity-configs-maven-plugin</artifactId>
<version>${teamcity.dsl.version}</version>
<configuration>
<format>kotlin</format>
<dstDir>target/generated-configs</dstDir>
</configuration>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>org.jetbrains.teamcity</groupId>
<artifactId>configs-dsl-kotlin</artifactId>
<version>${teamcity.dsl.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.jetbrains.teamcity</groupId>
<artifactId>configs-dsl-kotlin-plugins</artifactId>
<version>1.0-SNAPSHOT</version>
<type>pom</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-jdk8</artifactId>
<version>${kotlin.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-script-runtime</artifactId>
<version>${kotlin.version}</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>
Loading

0 comments on commit 5c9117a

Please sign in to comment.