A program for Windows that can keep track of bookings in a hotel.
Releases can be found here. Browsers may show a warning when the software is being downloaded.
Windows may prevent the program from starting. If a warning with the title "Windows protected your PC" or similar appears, click on "More info", then "Run anyway".
Releases are given a version number based on Semantic Versioning 2.0.0.
There is a changelog for this project here. Its format is based on keep a changelog 1.1.0.
Clone the repository:
git clone https://github.com/NTIG-Uppsala/hotel-pos-system
Make sure you have the .NET 8 SDK installed. You can get it from here.
dotnet tool install --global dotnet-ef
Run the following command from the Git repository:
dotnet run --project ./src/HotelPosSystem/HotelPosSystem.csproj
To build the project for distribution, run the following command from the Git repository:
dotnet publish ./src/HotelPosSystem/HotelPosSystem.csproj
Navigate to the src
folder and run:
dotnet build -c Release && dotnet test
If the above does not work, try running the commands separately.
Do not interact with your computer while the tests are running. Doing so might cause the tests to fail unexpectedly.
This project uses an .editorconfig file that defines the project's code style.
To fix the project's formatting, navigate to the src
directory and run:
dotnet format
Commits can be prevented if formatting is incorrect or tests fail.
To do this, create a file named pre-commit
in the .git/hooks
directory with the following content:
#!/bin/sh
set -e
readonly SOLUTION_PATH="./src/HotelPosSystem.sln"
if ! dotnet build -c Release $SOLUTION_PATH
then
echo -e "\nCommit aborted because build failed."
exit 1
fi
if ! dotnet format --verify-no-changes $SOLUTION_PATH
then
echo -e "\nCommit aborted because code formatting is incorrect. Please run 'dotnet format'."
exit 1
fi
if ! dotnet test $SOLUTION_PATH
then
echo -e "\nCommit aborted because tests failed."
exit 1
fi
The tests might fail unexpectedly if you interact with your computer while the pre-commit hook is running.
The .git
folder may be hidden by default.
Remember to add a migration after each database structure change.
See here
See here