Updated
On this page
Swift release target using a VERSION file as the source of truth, with tag-based publishing since SPM resolves packages by git tag directly.
#rlsbl.targets.swift
#rlsbl.targets.swift
Swift release target using a VERSION file as the source of truth, with tag-based publishing since SPM resolves packages by git tag directly.
#SwiftTarget
Release target for Swift packages (Package.swift + VERSION file).
#name
python
def name(self)#detect
python
def detect(self, dir_path)#read_name
python
def read_name(self, dir_path)Extract name from Package.swift.
#read_metadata
python
def read_metadata(self, dir_path)Swift packages have no standard license/description in Package.swift.
#read_version
python
def read_version(self, dir_path)Read version from the VERSION file.
#write_version
python
def write_version(self, dir_path, version)Write the new version to the VERSION file atomically.
Returns a list of relative file paths that were modified.
#version_file
python
def version_file(self)#tag_format
python
def tag_format(self, version)#publish
python
def publish(self, dir_path, version)No-op: the git tag IS the publication for SPM.
#template_dir
python
def template_dir(self)#template_vars
python
def template_vars(self, dir_path)Extract template variables from Package.swift.
#template_mappings
python
def template_mappings(self)#check_project_exists
python
def check_project_exists(self, dir_path)#get_project_init_hint
python
def get_project_init_hint(self)#dev_install_command
python
def dev_install_command(self, project_dir)