MCPcopy Index your code
hub / github.com/coder/coder / firstBuild

Method firstBuild

coderd/wsbuilder/wsbuilder.go:800–810  ·  view source on GitHub ↗

firstBuild returns true if this is the first build of the workspace, i.e. there are no prior builds.

()

Source from the content-addressed store, hash-verified

798
799// firstBuild returns true if this is the first build of the workspace, i.e. there are no prior builds.
800func (b *Builder) firstBuild() (bool, error) {
801 _, err := b.getLastBuild()
802 if xerrors.Is(err, sql.ErrNoRows) {
803 // first build!
804 return true, nil
805 }
806 if err != nil {
807 return false, err
808 }
809 return false, nil
810}
811
812func (b *Builder) getBuildNumber() (int32, error) {
813 bld, err := b.getLastBuild()

Callers 1

getDynamicParametersMethod · 0.95

Calls 2

getLastBuildMethod · 0.95
IsMethod · 0.45

Tested by

no test coverage detected