common

package module
v0.0.0-...-522f906 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: MIT Imports: 10 Imported by: 2

Documentation

Overview

Package common groups utility routines and types commonly used in 'prepare-assets' and 'prepare-build' module main packages as part of the WSL image and launcher build process.

Index

Constants

View Source
const GeneratedDir = "generated"

GeneratedDir is the generated output directory for a given released

Variables

This section is empty.

Functions

func GetPath

func GetPath(subdirectory string) (metaDir string, err error)

GetPath returns <subdirectory> prepended by its first parent.

Types

type WslReleaseInfo

type WslReleaseInfo struct {
	WslID               string   // uniquely identifies this distro in WSL context.
	AppID               string   // uniquely identifies this distro in store context.
	FullName            string   // full name of the distro bing built.
	BuildVersion        string   // Ubuntu version we are building with the dot removed to be compatible with UWP version schema. 20.04 -> 2004
	LauncherName        string   // name of the executable WSL launcher.
	ShortVersion        string   // Ubuntu version without point release and LTS. For instance  20.04 -> 20.04. 20.04.5 -> 20.04
	IconVersion         string   // If used in the assets, version to show in some icon without point release. 20.04 -> 20.04 LTS. 20.04.5 -> 20.04 LTS
	ReleaseVersion      string   // Full version name, without the Application in front. For instance, 20.04.5 LTS.
	TerminalProfileGUID string   // GUID for the Terminal profile used to update autogenerated profiles.
	ReservedNames       []string // list of reserved names in the store ("Ubuntu 20.04 LTS" for instance. One should match the UWP package name)

	CodeName    string // Ubuntu release code name (e.g. Focal Fossa, Impish Indri etc)
	ShouldBuild bool   //whether or not an image should be built for this release.
}

WslReleaseInfo models information about the Ubuntu releases to be used in the template files which are part of the WSL image and launcher build process.

func ReleasesInfo

func ReleasesInfo(csvPath string) (releasesInfo []WslReleaseInfo, err error)

ReleasesInfo returns all releases we care about from a csvPath.

func (*WslReleaseInfo) RootfsURL

func (w *WslReleaseInfo) RootfsURL(arch string) string

RootfsURL returns the URL to the rootfs tarball for the given architecture. The base image name is in the format: ubuntu-<version>-wsl-<arch>-<upgrade-flavor>.rootfs.tar.gz before 24.04, upgrade-flavor is always "wsl" otherwise: - ubuntu -> wsl (upgade: lts) - ubuntupreview -> preview (upgrade: always) - ubuntu24.04lts -> 24.04lts (upgrade: never)

Jump to

Keyboard shortcuts

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