Giter Site home page Giter Site logo

sil.buildtasks's Introduction

Readme

Several useful msbuild tasks.

NuGet version (SIL.BuildTasks) Build, Test and Pack

Current Tasks

Task Description
CreateChangelogEntry Given a Changelog file, this task will add an entry to the debian changelog.
CreateReleaseNotesHtml Given a markdown-style changelog file, this class will generate a release notes HTML file.
StampChangelogFileWithVersion Replaces the first line in a markdown-style Changelog/Release file with the version and date.
SetReleaseNotesProperty Given a markdown-style changelog file, this class will set a property to the changes mentioned in the topmost release.
Task Description
Archive
CpuArchitecture Return the CPU architecture of the current system.
DownloadFile Download a file from a web address.
FileUpdate
MakePot
MakeWixForDirTree
NormalizeLocales Drops country code from directories and filenames to help work with Crowdin
NUnit Run NUnit (v2) on a test assembly.
NUnit3 Run NUnit3 on a test assembly.
Split
StampAssemblies
UnixName Determine the Unix Name of the operating system executing the build.
UpdateBuildTypeFile

Build

Windows or Linux

Install .NET 6.0 SDK from https://dot.net/core-sdk-vscode .

Build and run tests:

dotnet pack --configuration Release SIL.ReleaseTasks.Dogfood/SIL.ReleaseTasks.Dogfood.csproj
dotnet test

Building a local package of SIL.BuildTasks for testing (Windows)

  1. Run the Pack build command from inside Visual Studio on the SIL.ReleaseTasks.Dogfood project
  2. Run the Pack build command from inside Visual Studio on the SIL.BuildTasks project
  3. Install the package from the output folder into your local Nuget source e.g.nuget.exe add output/Debug/SIL.BuildTasks.2.3.5-beta.1.nupkg -Source /c/Repositories/DevelopmentPackages/

sil.buildtasks's People

Contributors

andrew-polk avatar cambell-prince avatar chrisvire avatar darcywong00 avatar davidmoore1 avatar ddaspit avatar elisunger avatar ermshiperete avatar foolrunning avatar glasseyes avatar gmartin7 avatar gtryus avatar hatton avatar hindlemail avatar jasonleenaylor avatar johnthomson avatar marksvc avatar megahirt avatar neilmayhew avatar papeh avatar paxerit avatar phillip-hopper avatar regnrand avatar rmunn avatar stephenmcconnel avatar tombogle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sil.buildtasks's Issues

Log messages are lost

The logging in MakeWixForDirTree just puts out "High", "Normal" and "Low". The actual message is lost. Makes for pretty useless logging. See an example here.

`SetReleaseNotesProperty` will catch the version link section for the first published version

Consider I have the following CHANGELOG.md:

# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic
Versioning v2.0.0](https://semver.org/spec/v2.0.0.html).

## [0.0.1] - 2021-03-21
### Added
- Password authentication: `MatrixClient.Login`
- Reactive event sync: `MatrixClient.StartEventPolling`

[0.0.1]: https://github.com/ForNeVeR/Smith.MatrixSdk/releases/tag/v0.0.1
[Unreleased]: https://github.com/ForNeVeR/Smith.MatrixSdk/compare/v0.0.1...HEAD

After publishing the first release, my changelog inside of a NuGet package will contain the following:

Added:
- Password authentication: `MatrixClient.Login`
- Reactive event sync: `MatrixClient.StartEventPolling`

[0.0.1]: https://github.com/ForNeVeR/Smith.MatrixSdk/releases/tag/v0.0.1
[Unreleased]: https://github.com/ForNeVeR/Smith.MatrixSdk/compare/v0.0.1...HEAD

However, the link section is unwanted in the package.

Probably, we could detect its existence and exclude it automatically from the first build?

Replacement verification fails if ReplacementText contains match group syntax

Although the code does a Regex.Replace, which should allow for the ReplacementText to specify a regex replacement (e.g., with group numbers or names), the verification code does not consider whether there were any matches but merely checks to see whether the resulting string contains the literal ReplacementText string. If it doesn't, it reports failure and does not save the file.

Add filter option for project-specific entries to SetReleaseNotesProperty task

Summary

This new feature adds a filter option to the SetReleaseNotesProperty task which allows to filter out any entries that don't belong to a specific nuget package. To achieve this we add a new property FilterEntries that controls whether or not the new feature is enabled for a project.

Specification

  • the user can set the FilterEntries property in his .csproj file. If the property value evaluates true, the new filter option is
    enabled. If it evaluates to false or the property is not set, the filter option is disabled. This is the behavior that's implemented
    in version<= 2.5.0.
  • if the filter option is enabled, only entries without a tag or with a tag matching the current project are output. The tag itself is stripped off.
  • if the filter option is disabled, all entries are output.

Examples

CHANGELOG.md file

Given the following snippet of a CHANGELOG.md file:

...
## [Unreleased]

## [2.5.0] - 2021-02-22

### Added

- [MyProject1] Add `DoSomething()` method to `Foo`
- `ReadMe.md` Lorem ipsem

### Fixed

- [Some.OtherProject] Fix crash in `FooBar`

## [2.4.0] - 2021-01-22
...

Filter option enabled

If MyProject1.csproj sets the FilterEntries property:

<Project Sdk="Microsoft.NET.Sdk">
	<PropertyGroup>
            ...
		<FilterEntries>true</FilterEntries>
            ...
	</PropertyGroup>
        ...
</Project>

then the ReleaseNotesProperty will contain the following when building version 2.4.0 of MyProject1:

Changes since version 2.4.0

Added:
- Add `DoSomething()` method to `Foo`
- `ReadMe.md` Lorem ipsem

If likewise Some.Project.csproj sets FilterEntries and creates a nuget package Some.OtherProject (PackageId property):

<Project Sdk="Microsoft.NET.Sdk">
	<PropertyGroup>
            ...
		<FilterEntries>true</FilterEntries>
		<PackageId>Some.OtherProject</PackageId>
            ...
	</PropertyGroup>
        ...
</Project>

The output would be for Some.OtherProject:

Changes since version 2.4.0

Added:
- `ReadMe.md` Lorem ipsem

Fixed:
- Fix crash in `FooBar`

Filter option disabled

If neither project sets the FilterEntries property, the output would be identical for both projects:

Changes since version 2.4.0

Added:
- [MyProject1] Add `DoSomething()` method to `Foo`
- `ReadMe.md` Lorem ipsem

Fixed:
- [Some.OtherProject] Fix crash in `FooBar`

ToDo

  • implement filter option
  • add unit tests
  • update documentation
  • update changelog
  • mention +semver:minor in commit message

[SetReleaseNotesProperty] Release notes include closing tag of comment

If the CHANGELOG.md file contains a comment at the top, e.g.

<!-- comment
-->

## [Unreleased]

### Added

- [MyProject1] Add 'DoSomething()' method to 'Foo'

the closing tag of the comment will show up in the release notes if the entries are filtered:

-->
Changes since version 2.4.0

Added:
- Add 'DoSomething()' method to 'Foo'

I added ignored tests in db6802f.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.