Skip to content

v3.0.0

Compare
Choose a tag to compare
@suzuki-shunsuke suzuki-shunsuke released this 26 Jul 00:11
· 413 commits to main since this release
v3.0.0
4e12150

v2.0.1...v3.0.0

⚠️ Breaking Changes

#50 #51

  • Merge sub packages (circleci, drone, github-actions, codebuild) to cienv package
  • Remove the generic package
  • Change struct to pointer
  • Change API signature
  • Platform.CI() is renamed to Platform.ID()

Features

  • Add Add function to support custom platforms
  • Add JobURL to get a job URL

How to use

Get platform

platform := cienv.Get(nil)

Support custom platforms

⚠️ cienv.Add isn't goroutine safe.

cienv.Add(func(param *cienv.Param) cienv.Platform {
	// Support custom platform 1
})

cienv.Add(func(param *cienv.Param) cienv.Platform {
	// Support custom platform 2
})

Mock Getenv and Read

platform := cienv.Get(&cienv.Param{
	Getenv: mockGetenv,
	Read: mockRead,
})