bugfixes
All checks were successful
Rename the project from template / rename-project (push) Has been skipped
SonarQube Scan / SonarQube Trigger (push) Has been skipped
CI / linter (9.0.X, ubuntu-latest) (push) Successful in 51s
CI / tests_linux (9.0.X, ubuntu-latest) (push) Successful in 2m51s

This commit is contained in:
Simon Diesenreiter 2024-11-27 19:20:16 +01:00
parent 302e0f64a2
commit a6bae9dc80
8 changed files with 23 additions and 16 deletions

View File

@ -31,6 +31,10 @@ do
done
mv project_name $name
mv project_name.Tests $name.Tests
mv project_name.sln $name.sln
mv $name/project_name.csproj $name/$name.csproj
mv $name.Tests/project_name.Tests.csproj $name.Tests/$name.Tests.csproj
# This command runs only once on GHA!
rm -rf .gitea/template.yml

View File

@ -26,8 +26,6 @@ jobs:
- uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ matrix.dotnet-version }}
- name: Install project
run: make install
- name: Run linter
run: make lint
@ -44,8 +42,6 @@ jobs:
- uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ matrix.dotnet-version }}
- name: Install project
run: make install
- name: Run tests
run: make test

View File

@ -16,7 +16,7 @@ jobs:
fetch-depth: 0
ref: ${{ gitea.head_ref }}
- run: echo "REPOSITORY_NAME=$(echo "$GITHUB_REPOSITORY" | awk -F '/' '{print $2}' | tr '-' '_' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
- run: echo "REPOSITORY_NAME=$(echo "$GITHUB_REPOSITORY" | awk -F '/' '{print $2}' | tr '-' '_')" >> $GITHUB_ENV
shell: bash
- run: echo "REPOSITORY_URLNAME=$(echo "$GITHUB_REPOSITORY" | awk -F '/' '{print $2}')" >> $GITHUB_ENV

View File

@ -10,7 +10,7 @@ jobs:
sonarqube:
name: SonarQube Trigger
runs-on: ubuntu-latest
if: ${{ !endsWith (github.repository, 'Templates/Dotnet_Executable') }}
if: ${{ !contains ('project_name', format('{0}_{1}', 'project', 'name')) }}
steps:
- name: Checking out
uses: actions/checkout@v4

View File

@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/runtime:9.0
COPY . /app
COPY ./project_name/bin/Release/net9.0/ /app
WORKDIR /app
CMD ["project_name"]

View File

@ -5,16 +5,28 @@ help: ## Show the help.
@echo "Targets:"
@fgrep "##" Makefile | fgrep -v fgrep
.PHONY: buildrel
buildrel: ## Format code.
dotnet build -c Release project_name.sln
.PHONY: build
build: ## Format code.
dotnet build project_name.sln
.PHONY: publish
publish: ## Format code.
dotnet publish -c Release project_name.sln
.PHONY: fmt
fmt: ## Format code.
dotnet format project_name.sln
.PHONY: lint
lint: ## Lint code.
lint: ## Lint code.
dotnet format --verify-no-changes --verbosity diagnostic project_name.sln
.PHONY: test
test: lint ## Run tests and generate coverage report.
test: ## Run tests and generate coverage report.
dotnet test project_name.sln
.PHONY: clean
@ -40,11 +52,6 @@ docs: ## Build the documentation.
@$(ENV_PREFIX)mkdocs build
URL="site/index.html"; xdg-open $$URL || sensible-browser $$URL || x-www-browser $$URL || gnome-open $$URL || open $$URL
.PHONY: init
init: ## Initialize the project based on an application template.
@./.gitea/init.sh
# This project has been generated from rochacbruno/python-project-template
# __author__ = 'rochacbruno'
# __repo__ = https://github.com/rochacbruno/python-project-template

View File

@ -9,7 +9,7 @@ See also
### HOW TO USE THIS TEMPLATE
1. Create a new repository from this template and choose a name for your project
(e.g. `my_awesome_project` - recommendation is to use all lowercase and underscores separation for repo names.)
(e.g. `my_awesome_project` - recommendation is to use underscores separation for repo names.)
2. Wait until the first run of CI finishes (Gitea Actions will process the template and commit to your new repo)
3. Read the file [CONTRIBUTING.md](CONTRIBUTING.md)
4. Then clone your new project and happy coding!

View File

@ -16,7 +16,7 @@ class Program
if (o.Verbose)
{
Console.WriteLine($"Verbose output enabled. Current Arguments: -v {o.Verbose}");
Console.WriteLine("Quick Start Example! App is in Verbose mode!");
Console.WriteLine("Quick Start Example! App is in Verbose mode!");
}
else
{