Development Setup
How to set up your development environment for contributing to Divekit.
This guide will help you set up your development environment for contributing to Divekit.
Prerequisites
- Command Line access
- Internet connection
- Go 1.23 or higher
- Gitlab
- Access Token
- Group IDs
- (Git)
- (npm)
Setting Up the Development Environment
- Clone the repository:
git clone https://gitlab.git.nrw/divekit/tools/divekit-cli.git
- Navigate to the project directory:
cd divekit-cli
- Install the required dependencies:
go mod download
Install local modules (later possibly optional - but for development a huge help):
mkdir pkg
cd pkg
git clone https://gitlab.git.nrw/divekit/modules/gitlab-adapter
git clone https://gitlab.git.nrw/divekit/modules/config-management
cd ..
go work init
go work use ./pkg/gitlab-adapter
go work use ./pkg/config-management
- Build the CLI:
chmod +x build.sh
./build.sh
Then answer the questions or just press Enter for the default values (windows, amd64).
This will create a divekit
executable in the bin
directory. You can run this executable from the command line to use the CLI or run install
on it to install it globally.
For Example:
./bin/divekit_windows_amd64.exe install
This will install the divekit
command globally on your system. You can now run divekit
from any directory.
- Run the CLI:
./bin/divekit_windows_amd64.exe
# or
divekit
…or if you want to execute directly from the source code:
go run cmd/divekit/main.go
- Run the tests:
go test ./...
- Make your changes and submit a merge request.
Last modified January 23, 2025: add gifs (3575631)