release

package
v0.0.0-...-1087858 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 8, 2026 License: MIT Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPromotionSourceTargetMatch = errors.New("source and target environments must be different")
	ErrPromotionSourceNoActive    = errors.New("source environment has no active release")
)
View Source
var ErrNoPreviousRelease = errors.New("no previous release available")

Functions

func GenerateLLMsTxt

func GenerateLLMsTxt(website model.Website, pages map[string]model.Page, log *buildLog) ([]byte, error)

func GenerateRobotsText

func GenerateRobotsText(robots *model.WebsiteRobots, sitemapURL string) string

func GenerateSitemap

func GenerateSitemap(seo *model.WebsiteSEO, pages map[string]model.Page, log *buildLog) ([]byte, error)

func GenerateWebsiteStructuredDataBlocks

func GenerateWebsiteStructuredDataBlocks(website model.Website) ([]model.JSONLDBlock, error)

func NewReleaseID

func NewReleaseID(now time.Time) (string, error)

func ReadCurrentSymlinkTarget

func ReadCurrentSymlinkTarget(envDir string) (string, bool, error)

func SetCurrentSymlinkTarget

func SetCurrentSymlinkTarget(envDir, target string) error
func SwitchCurrentSymlink(envDir, releaseID string) error

Types

type BuildResult

type BuildResult struct {
	ReleaseID         string
	EnvironmentID     int64
	PreviousReleaseID *string
	ManifestJSON      string
	OutputHashes      map[string]string
	BuildLog          string
}

type Builder

type Builder struct {
	// contains filtered or unexported fields
}

func NewBuilder

func NewBuilder(db *sql.DB, blobs *blob.Store, websitesRoot string, logger *slog.Logger) (*Builder, error)

func (*Builder) Build

func (b *Builder) Build(ctx context.Context, websiteName, envName string) (out BuildResult, err error)

func (*Builder) WriteSourceArchive

func (b *Builder) WriteSourceArchive(ctx context.Context, websiteName, envName string, dst io.Writer) error

type HashMismatchError

type HashMismatchError struct {
	Reason string
}

func (*HashMismatchError) Error

func (e *HashMismatchError) Error() string

type MissingReleaseDirError

type MissingReleaseDirError struct {
	ReleaseID string
	Path      string
}

func (*MissingReleaseDirError) Error

func (e *MissingReleaseDirError) Error() string

type NotFoundError

type NotFoundError struct {
	// contains filtered or unexported fields
}

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

type PromoteResult

type PromoteResult struct {
	SourceEnvironmentID int64
	TargetEnvironmentID int64
	SourceReleaseID     string
	ReleaseID           string
	FileCount           int
	Hash                string
	Strategy            string
}

func Promote

func Promote(ctx context.Context, db *sql.DB, websitesRoot, websiteName, sourceEnvName, targetEnvName string) (out PromoteResult, err error)

type RetentionOptions

type RetentionOptions struct {
	Keep   int
	DryRun bool
	BlobGC bool
}

type RetentionResult

type RetentionResult struct {
	Website                 string
	Environment             string
	EnvironmentID           int64
	Keep                    int
	DryRun                  bool
	BlobGC                  bool
	ActiveReleaseID         *string
	RollbackReleaseID       *string
	PreviewPinnedReleaseIDs []string
	RetainedReleaseIDs      []string
	PrunableReleaseIDs      []string
	PrunedReleaseIDs        []string
	MarkedBlobCount         int
	BlobDeleteCandidates    []string
	DeletedBlobHashes       []string
	Warnings                []string
}

func RunRetention

func RunRetention(ctx context.Context, db *sql.DB, blobs *blob.Store, websitesRoot, websiteName, envName string, opts RetentionOptions) (RetentionResult, error)

type RollbackResult

type RollbackResult struct {
	EnvironmentID int64
	FromReleaseID string
	ToReleaseID   string
}

func Rollback

func Rollback(ctx context.Context, db *sql.DB, websitesRoot, websiteName, envName string) (RollbackResult, error)

type UnsupportedSourceExportError

type UnsupportedSourceExportError struct {
	// contains filtered or unexported fields
}

func (*UnsupportedSourceExportError) Error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL