Table of Contents generated with DocToc
Fuego is written in the go programming language (1.12 or newer), you need to have it installed and be familiar with it, to contribute code to fuego.
Fuego uses go modules, which means you'll need at least go version 1.11 to compile the program.
Fork and clone the repository and then build it:
cd fuego
go build
All dependencies will be downloaded and built automatically and the fuego binary will be created in the project directory (use go install to move the binary to your GOPATH if you wish).
The tests are located in test as a shunit2 shell script, against a the firebase emulator.
To run the tests, you'll need to install:
- firestore emulator (via either gcloud or firebase CLI)
- jq
- uuidgen (apt-get install uuidgen-runtime in gnu/linux)
To execute the tests, follow these steps
- Run the firestore emulator
$ gcloud beta emulators firestore start --host-port localhost:8080
Executing: /home/user/google-cloud-sdk/platform/cloud-firestore-emulator/cloud_firestore_emulator start --host=localhost --port=8080
[firestore] API endpoint: http://localhost:8080
[firestore] If you are using a library that supports the FIRESTORE_EMULATOR_HOST environment variable, run:
[firestore]
[firestore] export FIRESTORE_EMULATOR_HOST=localhost:8080
[firestore]
[firestore] Dev App Server is now running.
- In a different shell, go into the
tests
directory and run the tests script:
cd tests
./tests
or
./tests -- nameoffirsttest nameofsecondtest
Releases are managed by goreleaser.
Steps:
- export GITHUB_TOKEN=
your_token
- Update version in main.go (i.e v0.1.0)
- Update CHANGELOG.md (set version)
- Commit changes
- git tag -a v0.1.0 -m "First release"
- git push origin v0.1.0
- goreleaser (options: --rm-dist --release-notes=)