Skip to content

Commit

Permalink
Upgrade project, prepare GitHub flow
Browse files Browse the repository at this point in the history
Upgrades the project to work with supported versions, and prepares pipelines to work with a GitHub flow i.e., only main (will rename from master). Also fixes microsoft#273
  • Loading branch information
heaths committed Nov 14, 2022
1 parent 4524772 commit 8c7776e
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 24 deletions.
6 changes: 4 additions & 2 deletions .vsts-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ trigger:
batch: true
branches:
include:
- master
- develop
- main
paths:
exclude:
- README.md
tags:
include:
- "*"

pr: none

Expand Down
13 changes: 6 additions & 7 deletions .vsts-compliance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ trigger:
batch: true
branches:
include:
- master
- develop
- main
paths:
exclude:
- README.md
Expand Down Expand Up @@ -35,11 +34,11 @@ steps:
sourceScanPath: $(Build.SourcesDirectory)

- task: securedevelopmentteam.vss-secure-development-tools.build-task-prefast.SDLNativeRules@2
displayName: 'Run the PREfast SDL Native Rules for MSBuild'
displayName: Run the PREfast SDL Native Rules for MSBuild
continueOnError: true

- task: securedevelopmentteam.vss-secure-development-tools.build-task-policheck.PoliCheck@1
displayName: 'Run PoliCheck'
displayName: Run PoliCheck
inputs:
targetType: F
targetArgument: '$(Build.SourcesDirectory)'
Expand All @@ -49,7 +48,7 @@ steps:
continueOnError: true

- task: securedevelopmentteam.vss-secure-development-tools.build-task-binskim.BinSkim@3
displayName: 'Run BinSkim'
displayName: Run BinSkim
inputs:
InputType: Basic
Function: analyze
Expand All @@ -60,13 +59,13 @@ steps:
continueOnError: true

- task: securedevelopmentteam.vss-secure-development-tools.build-task-credscan.CredScan@2
displayName: 'Run CredScan'
displayName: Run CredScan
inputs:
debugMode: false

# Publish compliance results
- task: securedevelopmentteam.vss-secure-development-tools.build-task-publishsecurityanalysislogs.PublishSecurityAnalysisLogs@2
displayName: 'Publish Security Analysis Logs'
displayName: Publish Security Analysis Logs

- task: securedevelopmentteam.vss-secure-development-tools.build-task-postanalysis.PostAnalysis@1
displayName: Check SDL results
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This project uses the following software. Newer versions may work but backward c

## Coding

This project uses a Git flow model releasing from the `master` branch with development based on and stabilize in the `develop` branch. You can view current build status in the [README](README.md) document.
This project uses a GitHub flow model with development and releases based on the `main` branch. You can view current build status in the [README](README.md) document.

Please follow project code styles including,

Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
Visual Studio Locator
=====================

![build status: master](https://devdiv.visualstudio.com/DevDiv/_apis/build/status/Setup/Setup-vswhere-CI?branchName=master&label=master)
![build status: develop](https://devdiv.visualstudio.com/DevDiv/_apis/build/status/Setup/Setup-vswhere-CI?branchName=develop&label=develop)
![build status: main](https://devdiv.visualstudio.com/DevDiv/_apis/build/status/Setup/Setup-vswhere-CI?branchName=main&label=main)
[![github release](https://img.shields.io/github/release/Microsoft/vswhere.svg?logo=github&logoColor=white)](https://github.com/Microsoft/vswhere/releases/latest)
[![github releases: all](https://img.shields.io/github/downloads/Microsoft/vswhere/total.svg?logo=github&logoColor=white&label=github)](https://github.com/Microsoft/vswhere/releases)
[![nuget: all](https://img.shields.io/nuget/dt/vswhere.svg?logo=nuget&logoColor=white&label=nuget)](https://nuget.org/packages/vswhere)
Expand Down
3 changes: 1 addition & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ trigger: none
pr:
branches:
include:
- master
- develop
- main
paths:
exclude:
- README.md
Expand Down
4 changes: 0 additions & 4 deletions src/vswhere.lib/stdafx.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@

#define WIN32_LEAN_AND_MEAN

#ifndef MAXUINT
#define MAXUINT 0xffff
#endif

// Windows headers
#include <windows.h>
#include <fcntl.h>
Expand Down
Binary file modified src/vswhere.lib/vswhere.lib.rc
Binary file not shown.
4 changes: 2 additions & 2 deletions src/vswhere.lib/vswhere.lib.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
<ProjectGuid>{4CCF39CB-4794-44E2-AA57-D215F13CF606}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>vswherelib</RootNamespace>
<TargetUniversalCRTVersion>10.0.17763.0</TargetUniversalCRTVersion>
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
<TargetUniversalCRTVersion>10.0.19041.0</TargetUniversalCRTVersion>
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
Expand Down
3 changes: 3 additions & 0 deletions src/vswhere/Program.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ int wmain(_In_ int argc, _In_ LPCWSTR argv[])
}
catch (const system_error& ex)
{
// Make sure the console is initialized even for parsing errors.
console.Initialize();

const auto code = ex.code().value();
if (ERROR_INVALID_PARAMETER == code)
{
Expand Down
4 changes: 2 additions & 2 deletions src/vswhere/vswhere.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
<ProjectGuid>{210864F0-9A29-4479-B830-B802EE3F4D92}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>vswhere</RootNamespace>
<TargetUniversalCRTVersion>10.0.17763.0</TargetUniversalCRTVersion>
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
<TargetUniversalCRTVersion>10.0.19041.0</TargetUniversalCRTVersion>
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
Expand Down
4 changes: 2 additions & 2 deletions test/vswhere.test/vswhere.test.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
<ProjectGuid>{76268871-D5A5-46BD-9805-41DB1C3072D1}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>vswheretest</RootNamespace>
<TargetUniversalCRTVersion>10.0.17763.0</TargetUniversalCRTVersion>
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
<TargetUniversalCRTVersion>10.0.19041.0</TargetUniversalCRTVersion>
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
<ProjectSubType>NativeUnitTestProject</ProjectSubType>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
Expand Down

0 comments on commit 8c7776e

Please sign in to comment.