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

Method getBuildNumber

coderd/wsbuilder/wsbuilder.go:812–822  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

810}
811
812func (b *Builder) getBuildNumber() (int32, error) {
813 bld, err := b.getLastBuild()
814 if xerrors.Is(err, sql.ErrNoRows) {
815 // first build!
816 return 1, nil
817 }
818 if err != nil {
819 return 0, xerrors.Errorf("get last build to compute build number: %w", err)
820 }
821 return bld.BuildNumber + 1, nil
822}
823
824func (b *Builder) getState() ([]byte, error) {
825 if b.state.orphan {

Callers 1

buildTxMethod · 0.95

Calls 3

getLastBuildMethod · 0.95
IsMethod · 0.45
ErrorfMethod · 0.45

Tested by

no test coverage detected