From 8af5c6aa542c72bfc21679dd00d1c177e482517b Mon Sep 17 00:00:00 2001 From: Yauheni Pakala Date: Mon, 31 Oct 2022 10:14:30 +0200 Subject: [PATCH] Repository improvements (#497) --- .github/CONTRIBUTING.md | 2 +- .github/PULL_REQUEST_TEMPLATE.md | 10 ++++---- .github/labeler.yml | 30 +++++++++++------------ .github/workflows/labeler.yml | 5 +++- documentation/articles/developer-guide.md | 8 +++--- tools/binobj-cleaner.sh | 23 +++++++++++++++++ 6 files changed, 53 insertions(+), 25 deletions(-) create mode 100644 tools/binobj-cleaner.sh diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 815592c66..8551cfdb2 100755 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -2,6 +2,6 @@ See [Contributing](/documentation/articles/contributing.md) for information about coding styles, source structure, making pull requests, and more. -# Developers +## Developers See the [Developer Guide](/documentation/articles/developer-guide.md) for details about developing in this repo. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index eca1d572c..5f5c9b15d 100755 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,4 +1,4 @@ - - + None ### Platforms Affected @@ -51,6 +51,6 @@ Not applicable - [ ] I have read the [CONTRIBUTING](https://github.com/Softeq/XToolkit.WhiteLabel/blob/master/.github/CONTRIBUTING.md) document -- [ ] My code follows the [code styles](https://github.com/Softeq/dotnet-guidelines) +- [ ] My code follows the [code styles](https://github.com/Softeq/dotnet-guidelines/tree/xamarin_guidelines) - [ ] Targets the correct branch - [ ] Tests are passing (or failures are unrelated) diff --git a/.github/labeler.yml b/.github/labeler.yml index 1392ebb39..01ceb3aa5 100755 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,43 +1,43 @@ c/bindings: - - any: ['*Bindings*/*', '!*Bindings*Tests/*'] + - any: ['*Bindings*/**/*', '!*Bindings*Tests/**/*'] c/common: - - any: ['*Common*/*', '!*Common*Tests/*'] + - any: ['*Common*/**/*', '!*Common*Tests/**/*'] c/connectivity: - - any: ['*Connectivity*/*', '!*Connectivity*Tests/*'] + - any: ['*Connectivity*/**/*', '!*Connectivity*Tests/**/*'] c/permissions: - - any: ['*Permissions*/*', '!*Permissions*Tests/*'] + - any: ['*Permissions*/**/*', '!*Permissions*Tests/**/*'] c/push-notifications: - - any: ['*PushNotifications*/*', '!*PushNotifications*Tests/*'] + - any: ['*PushNotifications*/**/*', '!*PushNotifications*Tests/**/*'] c/remote: - - any: ['*Remote*/*', '!*Remote*Tests/*'] + - any: ['*Remote*/**/*', '!*Remote*Tests/**/*'] c/wl: - - any: ['*WhiteLabel*/*', '!*WhiteLabel*Tests/*', '!*WhiteLabel.Essentials*/*', '!*WhiteLabel.Forms*/*'] + - any: ['*WhiteLabel*/**/*', '!*WhiteLabel*Tests/*', '!*WhiteLabel.Essentials*/*', '!*WhiteLabel.Forms*/**/*'] c/wl.essentials: - - any: ['*WhiteLabel.Essentials*/*', '!*WhiteLabel.Essentials*Tests/*'] + - any: ['*WhiteLabel.Essentials*/**/*', '!*WhiteLabel.Essentials*Tests/**/*'] c/wl.forms: - - any: ['*WhiteLabel.Forms*/*', '!*WhiteLabel.Forms*Tests/*'] + - any: ['*WhiteLabel.Forms*/**/*', '!*WhiteLabel.Forms*Tests/**/*'] c/playground: - - samples/Playground*/* + - samples/Playground*/**/* CI/CD: - - .github/workflows/* - - azure-pipelines/* + - .github/workflows/**/* + - azure-pipelines/**/* documentation: - - documentation/* + - documentation/**/* p/Android: - - '*.Droid/*' + - '*.Droid/**/*' p/iOS: - - '*.iOS/*' + - '*.iOS/**/*' diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 92d283d84..930b902d9 100755 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -4,8 +4,11 @@ on: jobs: triage: + permissions: + contents: read + pull-requests: write runs-on: ubuntu-latest steps: - - uses: actions/labeler@master + - uses: actions/labeler@v4 with: repo-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/documentation/articles/developer-guide.md b/documentation/articles/developer-guide.md index 4436e3525..48b50705e 100755 --- a/documentation/articles/developer-guide.md +++ b/documentation/articles/developer-guide.md @@ -2,17 +2,19 @@ ## Clone source code -> git clone https://github.com/Softeq/XToolkit.WhiteLabel.git +```sh +git clone https://github.com/Softeq/XToolkit.WhiteLabel.git +``` ## Building the repository 1. Open the main solution [XToolkit.sln](https://github.com/Softeq/XToolkit.WhiteLabel/tree/master/) via Visual Studio for Mac or Visual Studio IDE or Rider; 2. Restore NuGet packages; 3. For build Android project: - - Change build configuration to **Debug/AnyCPU** + - Change build configuration to **Debug.Droid/AnyCPU** - Set **Playground.Droid** as startup project 4. For build iOS project: - - Change build configuration to **Debug/iPhoneSimulator** + - Change build configuration to **Debug.iOS/iPhoneSimulator** - Set **Playground.iOS** as startup project 5. For build Xamarin.Forms projects: - Android: **Playground.Forms.Droid** diff --git a/tools/binobj-cleaner.sh b/tools/binobj-cleaner.sh new file mode 100644 index 000000000..db441578a --- /dev/null +++ b/tools/binobj-cleaner.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# How to use: +# tools/binobj-cleaner.sh +# path - root path and cleanup entry point +# Example: +# sh tools/binobj-cleaner.sh . + +if [ -z $1 ] ; then + echo "Root path argument is required!" + exit 1 +else + folders_to_remove=$(find $1 -type d \( -name bin -or -name obj \)) + + if [[ $folders_to_remove = "" ]]; then + echo "No bin or obj folders to remove" + else + echo "Removing folders:" + echo "$folders_to_remove" + + rm -rf $folders_to_remove + fi +fi \ No newline at end of file