Skip to content

Release updates #102

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 22 additions & 6 deletions RELEASING.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,29 @@
# Releasing swiftly
# Releasing

Swiftly and the swiftly-install release script have different release schedules and their version numbers do not correspond. Below is instructions for releasing each.

## Releasing swiftly

1. Check out the commit you wish to create a release for. Ensure no other local modifications or changes are present.

1. Ensure the version string in `Swiftly.swift` is accurate. If it is not, push another commit updating it to the proper value.
2. Ensure the version string in `SwiftlyCore/SwiftlyCore.swift` is accurate. If it is not, push another commit updating it to the proper value.

3. Create a tag on that commit with the format "x.y.z". Do not omit "z", even if its value is 0.

4. Build the executables for the release by running ./scripts/build_release.sh from the root of the swiftly repository (do this once on an x86_64 machine and once on an aarch64 one)

5. Push the tag to `origin`. `git push origin <tag_name>`

6. Go to the GitHub page for the new tag, click edit tag, add an appropriate description, attach the prebuilt executables, and click "Publish Release".

## Releasing swiftly-install

1. Check out the commit you wish to create a release for. Ensure no other local modifications or changes are present.

1. Create a tag on that commit with the format "x.y.z". Do not omit "z", even if its value is 0.
2. Ensure the version string `SWIFTLY_INSTALL_VERSION` in `install/swiftly-install.sh` is accurate. If it is not, push another commit updating it to the proper value.

1. Build the executables for the release by running ./scripts/build_release.sh from the root of the swiftly repository (do this once on an x86_64 machine and once on an aarch64 one)
3. Create a tag on that commit with the format "swiftly-install-x.y.z". Do not omit "z", even if its value is 0.

1. Push the tag to `origin`.
4. Push the tag to `origin`. `git push origin <tag_name>`

1. Go to the GitHub page for the new tag, click edit tag, add an appropriate description, attach the prebuilt executables, and click "Publish Release".
5. Copy `install/swiftly-install.sh` to website branch of repository
2 changes: 1 addition & 1 deletion Sources/SwiftlyCore/SwiftlyCore.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation

public let version = SwiftlyVersion(major: 0, minor: 2, patch: 0)
public let version = SwiftlyVersion(major: 0, minor: 3, patch: 0)

/// A separate home directory to use for testing purposes. This overrides swiftly's default
/// home directory location logic.
Expand Down
2 changes: 1 addition & 1 deletion docker/docker-compose.1804.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ services:
image: swiftly:18.04-test
build:
args:
base_image: "swift:5.8-bionic"
base_image: "swift:5.10-bionic"

test:
image: swiftly:18.04-test
Expand Down
2 changes: 1 addition & 1 deletion docker/docker-compose.2004.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ services:
image: swiftly:20.04-test
build:
args:
base_image: "swift:5.8-focal"
base_image: "swift:5.10-focal"

test:
image: swiftly:20.04-test
Expand Down
2 changes: 1 addition & 1 deletion docker/docker-compose.2204.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ services:
image: swiftly:22.04-test
build:
args:
base_image: "swift:5.8-jammy"
base_image: "swift:5.10-jammy"

test:
image: swiftly:22.04-test
Expand Down
2 changes: 1 addition & 1 deletion docker/docker-compose.amazonlinux2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ services:
context: ..
dockerfile: docker/test-amazonlinux2.dockerfile
args:
base_image: "swift:5.8-amazonlinux2"
base_image: "swift:5.10-amazonlinux2"

test:
image: swiftly:amazonlinux2-test
Expand Down
2 changes: 1 addition & 1 deletion docker/docker-compose.ubi9.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ services:
context: ..
dockerfile: docker/test-ubi9.dockerfile
args:
base_image: "swift:5.8-rhel-ubi9"
base_image: "swift:5.10-rhel-ubi9"

test:
image: swiftly:ubi9-test
Expand Down
2 changes: 1 addition & 1 deletion docker/test-amazonlinux2.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG base_image=swift:5.8-amazonlinux2
ARG base_image=swift:5.10-amazonlinux2
FROM $base_image
# needed to do again after FROM due to docker limitation
ARG swift_version
Expand Down
2 changes: 1 addition & 1 deletion docker/test-ubi9.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG base_image=swift:5.8-rhel-ubi9
ARG base_image=swift:5.10-rhel-ubi9
FROM $base_image
# needed to do again after FROM due to docker limitation
ARG swift_version
Expand Down
2 changes: 1 addition & 1 deletion docker/test.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG swift_version=5.8
ARG swift_version=5.10
ARG ubuntu_version=jammy
ARG base_image=swift:$swift_version-$ubuntu_version
FROM $base_image
Expand Down
2 changes: 1 addition & 1 deletion install/swiftly-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ verify_getopt_install () {
return "$?"
}

SWIFTLY_INSTALL_VERSION="0.3.0"
SWIFTLY_INSTALL_VERSION="0.4.0"

MODIFY_PROFILE="true"
SWIFTLY_INSTALL_SYSTEM_DEPS="true"
Expand Down
2 changes: 1 addition & 1 deletion scripts/build.dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Dockerfile used to build a statically-linked swiftly executable for generic GNU/Linux platforms.
# See RELEASING.md for information on how to use this file.

FROM swift:5.8.1-amazonlinux2
FROM swift:5.10-amazonlinux2

# swiftly build depdenencies
RUN yum install -y \
Expand Down
6 changes: 3 additions & 3 deletions scripts/build_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ set -o errexit
version="$1"

if [[ -z "$version" ]]; then
echo "Usage: build.sh <version tag>"
echo "Usage: build_release.sh <version tag>"
exit 1
fi

raw_arch="$(uname --machine)"
raw_arch="$(uname -m)"
case "$raw_arch" in
"x86_64")
arch="x86_64"
Expand All @@ -20,7 +20,7 @@ case "$raw_arch" in
;;

*)
echo "Error: Unsupported CPU architecture: $RAW_ARCH"
echo "Error: Unsupported CPU architecture: $raw_arch"
;;
esac

Expand Down