@@ -21,21 +21,54 @@ Cloudsmith is the only fully hosted, cloud-native, universal package management
2121solution, that enables your organization to create, store and share packages in
2222any format, to any place, with total confidence.
2323
24- ## Development
24+ ## Build
2525
26- Make sure you have a working Go environment, for further reference or a guide
27- take a look at the [ install instructions] [ golang ] . This project requires
28- Go >= v1.17, at least that's the version we are using.
26+ If you are not familiar with [ Nix] [ nix ] it is up to you to have a working
27+ environment for Go (>= 1.24.0) as the setup won't we covered within this guide.
28+ Please follow the official install instructions for [ Go] [ golang ] . Beside that we
29+ are using [ go-task] [ gotask ] to define all commands to build this project.
2930
3031``` console
3132git clone https://github.com/webhippie/terrastate.git
3233cd terrastate
3334
34- make generate build
35-
35+ task build
3636./bin/terrastate -h
3737```
3838
39+ If you got [ Nix] [ nix ] and [ Direnv] [ direnv ] configured you can simply execute
40+ the following commands to get al dependencies including [ go-task] [ gotask ] and
41+ the required runtimes installed. You are also able to directly use the process
42+ manager of [ devenv] [ devenv ] :
43+
44+ ``` console
45+ cat << EOF > .envrc
46+ use flake . --impure --extra-experimental-features nix-command
47+ EOF
48+
49+ direnv allow
50+ ```
51+
52+ ## Development
53+
54+ To start developing on this project you have to execute only one command:
55+
56+ ``` console
57+ task watch
58+ ```
59+
60+ The development server should be running on
61+ [ http://localhost:8080 ] ( http://localhost:8080 ) . Generally it supports hot
62+ reloading which means the services are automatically restarted/reloaded on code
63+ changes.
64+
65+ If you got [ Nix] [ nix ] configured you can simply execute the [ devenv] [ devenv ]
66+ command to start the server:
67+
68+ ``` console
69+ devenv up
70+ ```
71+
3972## Security
4073
4174If you find a security issue please contact
@@ -65,6 +98,10 @@ Copyright (c) 2018 Thomas Boerger <thomas@webhippie.de>
6598[ dockerhub ] : https://hub.docker.com/r/webhippie/terrastate/tags/
6699[ quay ] : https://quay.io/repository/webhippie/terrastate?tab=tags
67100[ docs ] : https://webhippie.github.io/terrastate/#getting-started
101+ [ nix ] : https://nixos.org/
68102[ golang ] : http://golang.org/doc/install.html
103+ [ gotask ] : https://taskfile.dev/installation/
104+ [ direnv ] : https://direnv.net/
105+ [ devenv ] : https://devenv.sh/
69106[ pkgrepo ] : https://cloudsmith.io/~webhippie/repos/general/groups/
70107[ cloudsmith ] : https://cloudsmith.com/
0 commit comments