Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
* develop: (32 commits)
  (build) Bump to version 0.4.2 of the Recipe
  (build) Bump to version 0.4.1 of the Recipe
  (build) Bump to version 0.4.0 of the Recipe
  (build) Bump to version 0.3.0 of the Recipe
  (maint) Add sources explicitly during cake build
  (chocolatey#928) Update Chocolatey CLI to latest pre-release
  (build) Bump to Recipe 0.2.6
  (build) Make dependencies more consistent
  (build) Bump to recipe 0.2.5
  (build) Bump to Recipe 0.2.4
  (build) Update to Recipe 0.2.3
  (build) Remove vcs Id from pullRequest feature
  (build) Bump to latest Recipe package
  (build) Update build configuration files
  (build) Adds Missing Dependency for PullRequest Feature
  (build) Adds TeamCity build definition
  (version) v1.0.0-alpha
  (chocolatey#915) Fix keyboard bindings in conjunction with aggregated source view
  [ImgBot] Optimize images
  (maint) Fix typo: Config export complete dialogue
  ...
  • Loading branch information
gep13 committed Mar 17, 2022
2 parents 803556b + 776eadd commit 310ac81
Show file tree
Hide file tree
Showing 34 changed files with 500 additions and 461 deletions.
34 changes: 0 additions & 34 deletions .appveyor.yml

This file was deleted.

53 changes: 53 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Build

on:
push:
branches:
- master
- develop
- "feature/**"
- "release/**"
- "hotfix/**"
tags:
- "*"
pull_request:

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
runs-on: windows-2019
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
steps:
- name: Checkout the repository
uses: actions/checkout@v2

- name: Fetch all tags and branches
run: git fetch --prune --unshallow

- name: Cache Tools
uses: actions/cache@v2
with:
path: |
tools
Source/packages
key: ${{ runner.os }}-tools-${{ hashFiles('recipe.cake') }}

- name: Build project
run: |
./build.ps1 --target=CI
- name: Upload Issues-Report
uses: actions/upload-artifact@v2
with:
if-no-files-found: warn
name: issues
path: code_drop/issues-report.html

- name: Upload Packages
uses: actions/upload-artifact@v2
with:
if-no-files-found: warn
name: package
path: code_drop/Packages/**/*
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ tools/**
!tools/Addins/packages.config
!tools/Modules/packages.config
BuildArtifacts/
code_drop/
\.vs/

# Transifex related
Expand All @@ -223,5 +224,6 @@ docs/input/tasks
.DS_Store

SolutionInfo.cs
SolutionVersion.cs

config.wyam.packages.xml
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 GUI Config DSL Script</name>
<groupId>Chocolatey</groupId>
<artifactId>ChocolateyGUI</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>
84 changes: 84 additions & 0 deletions .teamcity/settings.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
import jetbrains.buildServer.configs.kotlin.v2019_2.*
import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.script
import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.powerShell
import jetbrains.buildServer.configs.kotlin.v2019_2.buildFeatures.pullRequests
import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.vcs
import jetbrains.buildServer.configs.kotlin.v2019_2.vcs.GitVcsRoot

version = "2021.2"

project {
buildType(ChocolateyGUI)
}

object ChocolateyGUI : BuildType({
id = AbsoluteId("ChocolateyGUI")
name = "Build"

artifactRules = """
code_drop/MsBuild.log
code_drop/MSBuild.msi.log
code_drop/ChocolateyGUI.msi
code_drop/TestResults/issues-report.html
code_drop/Packages/**/*.nupkg
""".trimIndent()

params {
param("env.vcsroot.branch", "%vcsroot.branch%")
param("env.Git_Branch", "%teamcity.build.vcs.branch.ChocolateyGUI_ChocolateyGuiVcsRoot%")
param("teamcity.git.fetchAllHeads", "true")
password("env.TRANSIFEX_API_TOKEN", "credentialsJSON:c81283e6-cf59-5c9e-9766-6f465018a295", display = ParameterDisplay.HIDDEN, readOnly = true)
password("env.GITHUB_PAT", "%system.GitHubPAT%", display = ParameterDisplay.HIDDEN, readOnly = true)
}

vcs {
root(DslContext.settingsRoot)

branchFilter = """
+:*
""".trimIndent()
}

steps {
powerShell {
name = "Prerequisites"
scriptMode = script {
content = """
# Install Chocolatey Requirements
if ((Get-WindowsFeature -Name NET-Framework-Features).InstallState -ne 'Installed') {
Install-WindowsFeature -Name NET-Framework-Features
}
choco install windows-sdk-7.1 netfx-4.0.3-devpack visualstudio2019buildtools netfx-4.8-devpack --confirm --no-progress
exit ${'$'}LastExitCode
""".trimIndent()
}
}

step {
name = "Include Signing Keys"
type = "PrepareSigningEnvironment"
}

script {
name = "Call Cake"
scriptContent = "call build.official.bat"
}
}

triggers {
vcs {
branchFilter = ""
}
}

features {
pullRequests {
provider = github {
authType = token {
token = "%system.GitHubPAT%"
}
}
}
}
})
1 change: 1 addition & 0 deletions GitVersion.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
next-version: 1.0.0
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@
<Reference Include="Caliburn.Micro.Platform.Core, Version=3.2.0.0, Culture=neutral, PublicKeyToken=8e5891231f2ed21f, processorArchitecture=MSIL">
<HintPath>..\packages\Caliburn.Micro.3.2.0\lib\net45\Caliburn.Micro.Platform.Core.dll</HintPath>
</Reference>
<Reference Include="chocolatey, Version=0.11.1.0, Culture=neutral, PublicKeyToken=79d02ea9cad655eb, processorArchitecture=MSIL">
<HintPath>..\packages\chocolatey.lib.0.11.1\lib\chocolatey.dll</HintPath>
<Reference Include="chocolatey, Version=1.0.0.52, Culture=neutral, PublicKeyToken=79d02ea9cad655eb, processorArchitecture=MSIL">
<HintPath>..\packages\chocolatey.lib.1.0.0-alpha-20220315-52\lib\chocolatey.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
Expand Down Expand Up @@ -224,8 +224,8 @@
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\SolutionInfo.cs">
<Link>Properties\SolutionInfo.cs</Link>
<Compile Include="..\SolutionVersion.cs">
<Link>Properties\SolutionVersion.cs</Link>
</Compile>
<Compile Include="Controls\Dialogs\IClosableDialog.cs" />
<Compile Include="Controls\Dialogs\IClosableChildWindow.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,10 @@
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Chocolatey GUI Common Windows Assembly")]
[assembly: AssemblyDescription("Shareable Windows specific code for Chocolatey GUI")]
#if DEBUG
[assembly: AssemblyConfiguration("Debug")]
#else
[assembly: AssemblyConfiguration("Release")]
#endif
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: NeutralResourcesLanguage("en-US")]
[assembly: CLSCompliant(false)]

[assembly: ComVisible(false)]
[assembly: NeutralResourcesLanguage("en-US")]
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
using ChocolateyGui.Common.Models.Messages;
using ChocolateyGui.Common.Providers;
using ChocolateyGui.Common.Services;
using ChocolateyGui.Common.ViewModels;
using ChocolateyGui.Common.Windows.Commands;
using ChocolateyGui.Common.Windows.Utilities;
using ChocolateyGui.Common.Windows.ViewModels.Items;
Expand Down Expand Up @@ -159,7 +160,7 @@ private bool CanGoToSource(object obj)
}

var sourceIndex = obj as int?;
return sourceIndex.HasValue && sourceIndex > 0 && sourceIndex <= _sourcesViewModel.Items.Count;
return sourceIndex.HasValue && sourceIndex > 0 && sourceIndex <= _sourcesViewModel.Items.Count(vm => !(vm is SourceSeparatorViewModel));
}

private void GoToSource(object obj)
Expand All @@ -169,12 +170,13 @@ private void GoToSource(object obj)
{
--sourceIndex;

if (sourceIndex < 0 || sourceIndex > _sourcesViewModel.Items.Count)
var items = _sourcesViewModel.Items.Where(vm => !(vm is SourceSeparatorViewModel)).ToList();
if (sourceIndex < 0 || sourceIndex > items.Count)
{
return;
}

_sourcesViewModel.ActivateItem(_sourcesViewModel.Items[sourceIndex.Value]);
_sourcesViewModel.ActivateItem(items[sourceIndex.Value]);
}
}

Expand Down
2 changes: 1 addition & 1 deletion Source/ChocolateyGui.Common.Windows/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<package id="BuildTools.FxCop" version="1.0.1" targetFramework="net40" />
<package id="Caliburn.Micro" version="3.2.0" targetFramework="net48" />
<package id="Caliburn.Micro.Core" version="3.2.0" targetFramework="net48" />
<package id="chocolatey.lib" version="0.11.1" targetFramework="net452" />
<package id="chocolatey.lib" version="1.0.0-alpha-20220315-52" targetFramework="net48" />
<package id="ControlzEx" version="4.4.0" targetFramework="net48" />
<package id="Fizzler" version="1.2.0" targetFramework="net48" />
<package id="HarfBuzzSharp" version="2.6.1.4" targetFramework="net48" />
Expand Down
Loading

0 comments on commit 310ac81

Please sign in to comment.