relslash

package module
v0.0.0-...-c2a0743 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2020 License: MIT Imports: 13 Imported by: 0

README

relslash

Proof of concept for updating multiple release branches of a tile

Need a new name (suggestions welcome). I thought since most backported branch names in the tile repos start with "rel/", that was the first thing that came to my name when creating the repo.

I am feeling the best place for most of this code is to be integrated into the https://github.com/pivotal-cf/kiln repo or the tile-checker.

Notes

The product repo must be in good shape ("master" and "rel/*' branches clean).

Make sure the env script is run to get the correct wasm_exec.js file.

Also if you don't mind please replace the git name and email to your own.

Development Setup

I ran the following in the demo on 2020/03/27.

GOOS=js GOARCH=wasm go build -o bin/bump-releases.wasm pages/bump-releases/*.go && \
          PORT=8080 go run cmd/bump-release-server/*.go

Documentation

Index

Constants

View Source
const (
	TileRepoRelBranchPrefix = "rel/"
	TileRepoMasterBranch    = "master"
	KilnFileRemoteSource    = "final-pcf-bosh-releases"
)

Variables

This section is empty.

Functions

func BoshReleaseName

func BoshReleaseName(fs billy.Filesystem) (string, error)

func BoshReleaseVersions

func BoshReleaseVersions(fs billy.Dir) ([]*semver.Version, bool, error)

func SetKilnfileLock

func SetKilnfileLock(fs billy.Basic, lock KilnFileLock) error

func SupportedTileBranches

func SupportedTileBranches(iter storer.ReferenceIter) ([]*plumbing.Reference, error)

Types

type BoshReleaseBumpSetData

type BoshReleaseBumpSetData struct {
	BoshReleaseName            string
	BoshReleaseVersionIsSemver bool
	BoshReleaseVersions        VersionList
	TileBranches               ReferenceList
}

func NewBoshReleaseBumpSetData

func NewBoshReleaseBumpSetData(tileRepo, releaseRepo *git.Repository) (BoshReleaseBumpSetData, error)

NewBoshReleaseBumpSetData is a "porcelain" wrapper around loading the data needed to make decisions around a single bosh release repo bumps

TODO make releaseRepo -> releaseRepos and receive variadic list of repositories

func (BoshReleaseBumpSetData) MapTileBranchesToBoshReleaseVersions

func (data BoshReleaseBumpSetData) MapTileBranchesToBoshReleaseVersions(tileRepo *git.Repository) (map[string][]Reference, error)

type ByIncreasingGeneralAvailabilityDate

type ByIncreasingGeneralAvailabilityDate []*plumbing.Reference

func (ByIncreasingGeneralAvailabilityDate) Len

func (ByIncreasingGeneralAvailabilityDate) Less

func (ByIncreasingGeneralAvailabilityDate) Swap

type KilnFileLock

type KilnFileLock struct {
	Releases []ReleaseLock `yaml:"releases"`
}

func KilnfileLock

func KilnfileLock(fs billy.Basic) (KilnFileLock, error)

type Reference

type Reference plumbing.Reference

func (Reference) MarshalJSON

func (rf Reference) MarshalJSON() ([]byte, error)

func (*Reference) UnmarshalJSON

func (rf *Reference) UnmarshalJSON(buf []byte) error

type ReferenceList

type ReferenceList []*plumbing.Reference

func (ReferenceList) MarshalJSON

func (rfl ReferenceList) MarshalJSON() ([]byte, error)

func (*ReferenceList) UnmarshalJSON

func (rfl *ReferenceList) UnmarshalJSON(buf []byte) error

type ReleaseLock

type ReleaseLock struct {
	Name         string `yaml:"name"`
	SHA1         string `yaml:"sha1,omitempty"`
	Version      string `yaml:"version"`
	RemoteSource string `yaml:"remote_source"`
	RemotePath   string `yaml:"remote_path"`
}

func ReleaseLockWithName

func ReleaseLockWithName(name string, releases []ReleaseLock) (ReleaseLock, int, error)

type VersionList

type VersionList []*semver.Version

func (*VersionList) MarshalJSON

func (vl *VersionList) MarshalJSON() ([]byte, error)

func (*VersionList) UnmarshalJSON

func (vl *VersionList) UnmarshalJSON(buf []byte) error

type VersionsDecreasing

type VersionsDecreasing []*semver.Version

func (VersionsDecreasing) Len

func (sv VersionsDecreasing) Len() int

func (VersionsDecreasing) Less

func (sv VersionsDecreasing) Less(i, j int) bool

func (VersionsDecreasing) Swap

func (sv VersionsDecreasing) Swap(i, j int)

type VersionsIncreasing

type VersionsIncreasing []*semver.Version

func (VersionsIncreasing) Len

func (sv VersionsIncreasing) Len() int

func (VersionsIncreasing) Less

func (sv VersionsIncreasing) Less(i, j int) bool

func (VersionsIncreasing) Swap

func (sv VersionsIncreasing) Swap(i, j int)

Directories

Path Synopsis
cmd
pages

Jump to

Keyboard shortcuts

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