Skip to content

Instantly share code, notes, and snippets.

@PadreSVK
PadreSVK / Directory.Build.props
Last active Jan 6, 2021
Infrastructure for append git metadata
View Directory.Build.props
<Project>
<PropertyGroup>
<Copyright>© 2021 Paradajka Paprika</Copyright>
<Authors>Paradajka Paprika</Authors>
<Company>Paradajka Paprika</Company>
<StableVersionBranch>master</StableVersionBranch>
<RepositoryUrl>https://dev.azure.com/mysuperorganization/GitMetadataInfrastructure/_git/GitMetadataInfrastructure</RepositoryUrl>
</PropertyGroup>
<ItemGroup>
@PadreSVK
PadreSVK / Directory.Build.props
Last active Dec 22, 2020
Combo of props + targets that add to dlls and nuget git metadata and source link support for pdb
View Directory.Build.props
<Project>
<PropertyGroup>
<StableVersionBranch>master</StableVersionBranch>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="GitInfo" Version="2.1.2" PrivateAssets ="All">
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
@PadreSVK
PadreSVK / Directory.Build.targets
Last active Dec 14, 2020
Sample of .targets for solution wide additing git metadata dlls and autoincrement Versions based on GitVersion
View Directory.Build.targets
<Project>
<PropertyGroup>
<StableVersionBranch>master</StableVersionBranch>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="GitVersionTask" Version="5.5.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
@PadreSVK
PadreSVK / Directory.Build.props
Last active Dec 14, 2020
Sample of solution wide additing git metadata to dlls and additing nuget version suffix for non master branch
View Directory.Build.props
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<StableVersionBranch>master</StableVersionBranch>
<!-- this should be defined in every csproj - if is not filled dont have affect on functioniality (nuget metadata) -->
<!-- <RepositoryUrl>https://github.com/XXXXX.git</RepositoryUrl>-->
</PropertyGroup>
<ItemGroup>
<PackageReference Include="GitInfo" Version="2.1.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
@PadreSVK
PadreSVK / Project.csproj
Last active Dec 12, 2020
Simple nuget autoincrement of nuget prerelease version based on branch policy
View Project.csproj
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Version>1.0.1</Version>
<MainVersionSchemeBranch>master</MainVersionSchemeBranch>
<RepositoryUrl>https://github.com/PadreSVK/plzen-2020-web-development.git</RepositoryUrl>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="GitInfo" Version="2.1.2">
<PrivateAssets>all</PrivateAssets>
View jsconfig.json
{
"compilerOptions": {
"baseUrl": "./",
"paths": {
"@/*": [
"src/*"
]
}
}
}
View pr-template.md

What does this PR do?

Related issues

Author's checklist

View enumsample.cpp
// cv042.cpp : This file contains the 'main' function. Program execution begins and ends there.
//
#include <iostream>
#include "test.h"
enum enum_name
{
element1,
element2,
@PadreSVK
PadreSVK / .gitconfig
Last active Sep 29, 2020
Git configuration for more organizations/git profiles
View .gitconfig
[user]
email = patrik.svikruha@gmail.com
name = Patrik Svikruha
[credential]
helper = wincred
[filter "lfs"]
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
clean = git-lfs clean -- %f
View aaa.js
async update({ commit }, { token, password })
{
const result = await axios.put(
passwordChangeUrl,
{ token, password },
{ validateStatus: status => status === 404 || status === 400 }
)
switch (result.status) {
case 404:
commit("login is expired")
You can’t perform that action at this time.