Semantic Versioning

Today I need to set up token refreshing for the api service.

The problem is that a bearer token returned by a client credentials flow is valid for 5 minutes, and I'm not refreshing it.

I solved it by running a goroutine that refreshes the token every 4.5 minutes. Simplified version:

go handler.StartTokenTicker()

func (h *AuthHandler) StartTokenTicker() {
	_ := h.refreshApiToken()
	ticker := time.NewTicker(4*time.Minute + 30*time.Second)
	for range ticker.C {
		_ := h.refreshApiToken()
	}
}

Next up, I need to start with finishing up the infrastructure and getting ready to deploy. The first thing is setting up auto versioning. I will be using automatic semantic versioning following the angular format. I use this daily at my job, but never set it up myself.

This is how it works, basically:

Each commit you make, you prefix with either feat, fix, or chore. Based on this, a CI process determines whether to bump the semantic version, generates a changelog, git tag, and a github release.

Tried to set it up but got stuck. The official getting started guide results in an error. Love when this happens. Enough for today.