mirror of
https://github.com/kubescape/kubescape.git
synced 2026-04-15 06:58:11 +00:00
* fixes #964 * adapted build and ci to use build tag * fixup error messages * report git scan skipped warning & version * fixed CI on windows: powershell parsing args... * fixup leftover comment * fixup typo in test message * resolved merge conflicts on unit tests * fix: added gitenabled tag to Makefile target Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
23 lines
524 B
Go
23 lines
524 B
Go
//go:build !gitenabled
|
|
|
|
package cautils
|
|
|
|
import (
|
|
"errors"
|
|
|
|
"github.com/kubescape/go-git-url/apis"
|
|
)
|
|
|
|
var ErrFatalNotSupportedByBuild = errors.New(`git scan not supported by this build. Build with tag "gitenabled" to enable the git scan feature`)
|
|
|
|
type gitRepository struct {
|
|
}
|
|
|
|
func newGitRepository(root string) (*gitRepository, error) {
|
|
return &gitRepository{}, ErrWarnNotSupportedByBuild
|
|
}
|
|
|
|
func (g *gitRepository) GetFileLastCommit(filePath string) (*apis.Commit, error) {
|
|
return nil, ErrFatalNotSupportedByBuild
|
|
}
|