Skip to content

Enhance: Extract Dynamic Value From Genesis.go #842

@andy-shi88

Description

@andy-shi88

Description

Current branching management have some problem in it, the main branches:

  • develop
  • staging
  • alpha

All have different genesis.go and genesisSpine.go

This causes problem, where we cannot easily apply git-flow to this repository.

Final goal:

be able to:

  • use develop branch for any new feature (including experimental)
  • use staging branch for stable node
  • push bug-fix to staging and replicate the fix on develop (2 PRs)
  • purge and re-branch staging when decided develop:latest is stable enough
  • tag in master

How

  • Having exact same content for every branch (including genesis.go genesisSpine.go)
  • Move any dynamic value to external file
    • config.toml -> config.dev.toml
    • node_keys.json -> node_keys.dev.json
    • genesis.go -> genesis.go + genesis.dev.json
  • Ignore external files

Breakdown

  • move genesis to external file prefixed or suffixed with .dev .staging .alpha based on environment
  • suffix or prefix config with the same env.
  • suffix or prefix node_keys

Expected behavior

Every branch having same file, but switchable environement variable-ish

Metadata

Metadata

Assignees

Labels

BACKWARD_COMPATIBLErequire changes that are backward compatible, no reset requiredCOREcore functionalitiesPROPOSALnew proposal, can be design, implementation, structure, algorithm, etc.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions