firstBuild returns true if this is the first build of the workspace, i.e. there are no prior builds.
()
| 798 | |
| 799 | // firstBuild returns true if this is the first build of the workspace, i.e. there are no prior builds. |
| 800 | func (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 | |
| 812 | func (b *Builder) getBuildNumber() (int32, error) { |
| 813 | bld, err := b.getLastBuild() |
no test coverage detected