Skip to content

Commit

Permalink
Merge pull request #1 from fabulous-dev/format-project
Browse files Browse the repository at this point in the history
Format the whole repo as Fabulous.XamarinForms
  • Loading branch information
TimLariviere authored Jan 5, 2023
2 parents 6ea21ee + d0f57b3 commit a210f42
Show file tree
Hide file tree
Showing 149 changed files with 2,233 additions and 3,127 deletions.
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"fantomas": {
"version": "5.1.4",
"version": "5.1.5",
"commands": [
"fantomas"
]
Expand Down
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
[*.fs]
max_line_length=160
fsharp_space_before_lowercase_invocation = false
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: [TimLariviere, edgarfgp]
40 changes: 25 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
name: Build
on:
push:
branches: [ 'v2.1' ]
paths-ignore: [ 'docs/**' ]
push:
branches: [ 'main' ]
paths-ignore: [ 'docs/**' ]

permissions: write-all

env:
VERSION: 2.1.0
VERSION: 2.1.1
CONFIG: Release
SLN_FILE: Fabulous.MauiControls.NoSamples.sln
TEMPLATE_PROJ: templates/Fabulous.MauiControls.Templates.proj

jobs:
build:
runs-on: macos-12
env:
SLN_FILE: Fabulous.MauiControls.NoSamples.sln
TEMPLATE_PROJ: templates/Fabulous.MauiControls.Templates.proj
steps:
- uses: actions/checkout@v3
- name: Set nightly version
run: |
NIGHTLY_VERSION=${VERSION}-nightly-${GITHUB_RUN_ID}
echo "Nightly version is $NIGHTLY_VERSION"
echo "NIGHTLY_VERSION=$NIGHTLY_VERSION" >> "$GITHUB_ENV"
- name: Checkout sources
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
Expand All @@ -26,14 +32,18 @@ jobs:
- name: Restore
run: dotnet restore ${SLN_FILE}
- name: Build
run: dotnet build ${SLN_FILE} -p:Version=${VERSION}-nightly-${GITHUB_RUN_ID} --no-restore --configuration Release
run: dotnet build ${SLN_FILE} -p:Version=${NIGHTLY_VERSION} -c ${CONFIG} --no-restore
- name: Test
run: dotnet test ${SLN_FILE} -p:Version=${VERSION}-nightly-${GITHUB_RUN_ID} --no-build --configuration Release
run: dotnet test ${SLN_FILE} -p:Version=${NIGHTLY_VERSION} -c ${CONFIG} --no-build
- name: Pack
run: |
find templates -type f -name template.json | xargs sed -i bak "s/FABULOUS_PKG_VERSION/${VERSION}-nightly-${GITHUB_RUN_ID}/g"
dotnet pack ${SLN_FILE} -p:Version=${VERSION}-nightly-${GITHUB_RUN_ID} --configuration Release --output nupkgs
dotnet pack ${TEMPLATE_PROJ} -p:Version=${VERSION}-nightly-${GITHUB_RUN_ID} -p:IsNightlyBuild=true --configuration Release --output nupkgs
find templates -type f -name template.json | xargs sed -i bak "s/FABULOUS_PKG_VERSION/${NIGHTLY_VERSION}/g"
dotnet pack ${SLN_FILE} -p:Version=${NIGHTLY_VERSION} -c ${CONFIG} --no-build --output nupkgs
dotnet pack ${TEMPLATE_PROJ} -p:Version=${NIGHTLY_VERSION} -p:IsNightlyBuild=true -c ${CONFIG} --output nupkgs
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: Packages
path: nupkgs/
- name: Push
run: |
dotnet nuget push "nupkgs/*.nupkg" -s https://nuget.pkg.github.com/fabulous-dev/index.json -k ${{ secrets.GITHUB_TOKEN }} --skip-duplicate
run: dotnet nuget push "nupkgs/*.nupkg" -s https://nuget.pkg.github.com/fabulous-dev/index.json -k ${{ secrets.GITHUB_TOKEN }} --skip-duplicate
15 changes: 9 additions & 6 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
name: Pull Request
on: pull_request

env:
SLN_FILE: Fabulous.MauiControls.NoSamples.sln
CONFIG: Release

jobs:
build:
pull_request:
runs-on: macos-12
env:
SLN_FILE: Fabulous.MauiControls.NoSamples.sln
steps:
- uses: actions/checkout@v3
- name: Checkout sources
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
Expand All @@ -21,6 +24,6 @@ jobs:
- name: Restore
run: dotnet restore ${SLN_FILE}
- name: Build
run: dotnet build ${SLN_FILE} --no-restore --configuration Release
run: dotnet build ${SLN_FILE} -c ${CONFIG} --no-restore
- name: Test
run: dotnet test ${SLN_FILE} --no-build --configuration Release
run: dotnet test ${SLN_FILE} -c ${CONFIG} --no-build
42 changes: 31 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,32 @@ on:

permissions: write-all

env:
CONFIG: Release
SLN_FILE: Fabulous.MauiControls.NoSamples.sln
TEMPLATE_PROJ: templates/Fabulous.MauiControls.Templates.proj

jobs:
build:
release:
runs-on: macos-12
environment: nuget
env:
SLN_FILE: Fabulous.MauiControls.NoSamples.sln
steps:
- uses: actions/checkout@v3
- name: Checkout sources
uses: actions/checkout@v3
- name: Extract version from tag
uses: damienaicheh/[email protected]
- name: Set release version
run: |
RELEASE_VERSION=${MAJOR}.${MINOR}.${PATCH}
echo "Release version is $RELEASE_VERSION"
echo "RELEASE_VERSION=$RELEASE_VERSION" >> "$GITHUB_ENV"
- name: Get Changelog Entry
id: changelog_reader
uses: mindsers/changelog-reader-action@v2
with:
validation_level: warn
version: '${{ env.RELEASE_VERSION }}'
path: ./CHANGELOG.md
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
Expand All @@ -25,14 +41,18 @@ jobs:
- name: Restore
run: dotnet restore ${SLN_FILE}
- name: Build
run: dotnet build ${SLN_FILE} -p:Version="${MAJOR}.${MINOR}.${PATCH}" --no-restore --configuration Release
run: dotnet build ${SLN_FILE} -p:Version=${RELEASE_VERSION} -c ${CONFIG} --no-restore
- name: Test
run: dotnet test ${SLN_FILE} -p:Version="${MAJOR}.${MINOR}.${PATCH}" --no-build --configuration Release
run: dotnet test ${SLN_FILE} -p:Version=${RELEASE_VERSION} -c ${CONFIG} --no-build
- name: Pack
run: |
find templates -type f -name template.json | xargs sed -i bak "s/FABULOUS_PKG_VERSION/${MAJOR}.${MINOR}.${PATCH}/g"
dotnet pack ${SLN_FILE} -p:Version="${MAJOR}.${MINOR}.${PATCH}" --configuration Release --output nupkgs
dotnet pack templates/Maui/Fabulous.MauiControls.Templates.proj -p:Version="${MAJOR}.${MINOR}.${PATCH}" --configuration Release --output nupkgs
find templates -type f -name template.json | xargs sed -i bak "s/FABULOUS_PKG_VERSION/${RELEASE_VERSION}/g"
dotnet pack ${SLN_FILE} -p:Version=${RELEASE_VERSION} -p:PackageReleaseNotes="${{ steps.changelog_reader.outputs.changes }}" -c ${CONFIG} --no-build --output nupkgs
dotnet pack ${TEMPLATE_PROJ} -p:Version=${RELEASE_VERSION} -c ${CONFIG} --output nupkgs
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: Packages
path: nupkgs/
- name: Push
run: |
dotnet nuget push "nupkgs/*.nupkg" -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_TOKEN }} --skip-duplicate
run: dotnet nuget push "nupkgs/*" -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_TOKEN }} --skip-duplicate
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -351,4 +351,5 @@ MigrationBackup/

.idea

Resource.designer.cs
Resource.designer.cs
nupkgs/
20 changes: 17 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
### Version 2.1.1
# Changelog

#### General
- Fabulous.MauiControls has moved from the Fabulous repository to its own repository: [https://github.com/fabulous-dev/Fabulous.MauiControls](https://github.com/fabulous-dev/Fabulous.MauiControls)
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](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

_No unreleased changes_

## [2.1.1] - 2023-01-05

### Changed
- Fabulous.MauiControls has moved from the Fabulous repository to its own repository: [https://github.com/fabulous-dev/Fabulous.MauiControls](https://github.com/fabulous-dev/Fabulous.MauiControls)

[unreleased]: https://github.com/fabulous-dev/Fabulous.MauiControls/compare/2.1.1...HEAD
[2.1.1]: https://github.com/fabulous-dev/Fabulous.MauiControls/releases/tag/v2.1.1
128 changes: 128 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
[email protected].
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series
of actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.

Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.
21 changes: 21 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<Project>

<PropertyGroup>
<RepositoryUrl>https://github.com/fabulous-dev/Fabulous.MauiControls</RepositoryUrl>
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
<DisableImplicitSystemValueTupleReference>true</DisableImplicitSystemValueTupleReference>
<EnableDefaultEmbeddedResourceItems>false</EnableDefaultEmbeddedResourceItems>
</PropertyGroup>

<!-- Shared NuGet Package info -->
<PropertyGroup>
<Authors>Fabulous contributors</Authors>
<PackageTags>Fabulous;F#;Declarative UI;MVU;Maui;Android;iOS;macOS;Windows;Linux</PackageTags>
<PackageIcon>nuget-icon.png</PackageIcon>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/fabulous-dev/Fabulous.MauiControls</PackageProjectUrl>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>

</Project>
18 changes: 18 additions & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<Project>

<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>

<ItemGroup>
<PackageVersion Include="Fabulous" Version="2.1.0" />
<PackageVersion Include="FsCheck.NUnit" Version="2.16.4" />
<PackageVersion Include="FSharp.Android.Resource" Version="1.0.4" />
<PackageVersion Include="FSharp.Core" Version="7.0.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.2.0" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="1.1.1" />
<PackageVersion Include="NUnit" Version="3.13.3" />
<PackageVersion Include="NUnit3TestAdapter" Version="4.2.1" />
</ItemGroup>

</Project>
Loading

0 comments on commit a210f42

Please sign in to comment.