Skip to content

Latest commit

 

History

History
80 lines (59 loc) · 2.46 KB

HACKING.md

File metadata and controls

80 lines (59 loc) · 2.46 KB

Table of Contents generated with DocToc

How to contribute to Fuego

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.

Building 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).

Testing

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

  1. 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.
  1. In a different shell, go into the tests directory and run the tests script:
cd tests
./tests
or
./tests -- nameoffirsttest nameofsecondtest

Releases

Releases are managed by goreleaser.

Steps:

  1. export GITHUB_TOKEN=your_token
  2. Update version in main.go (i.e v0.1.0)
  3. Update CHANGELOG.md (set version)
  4. Commit changes
  5. git tag -a v0.1.0 -m "First release"
  6. git push origin v0.1.0
  7. goreleaser (options: --rm-dist --release-notes=)