Skip to content
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

Update previous Crystal release - 1.3.2 #11715

Merged
merged 7 commits into from
Jan 20, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ jobs:
echo "export CRYSTAL_SHA1=$CIRCLE_SHA1" >> build.env

# Which previous version use
export PREVIOUS_CRYSTAL_BASE_URL="https://github.com/crystal-lang/crystal/releases/download/1.3.1/crystal-1.3.1-1"
export PREVIOUS_CRYSTAL_BASE_URL="https://github.com/crystal-lang/crystal/releases/download/1.3.2/crystal-1.3.2-1"
echo "export PREVIOUS_CRYSTAL_RELEASE_LINUX64_TARGZ=${PREVIOUS_CRYSTAL_BASE_URL}-linux-x86_64.tar.gz" >> build.env
echo "export PREVIOUS_CRYSTAL_RELEASE_DARWIN_TARGZ=${PREVIOUS_CRYSTAL_BASE_URL}-darwin-universal.tar.gz" >> build.env

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
crystal_bootstrap_version: [1.2.2, 1.3.1]
crystal_bootstrap_version: [1.2.2, 1.3.2]
include:
# libffi is only available starting from the 1.2.2 build images
- crystal_bootstrap_version: 1.0.0
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/openssl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
openssl3:
runs-on: ubuntu-latest
name: "OpenSSL 3.0"
container: crystallang/crystal:1.3.1-alpine
container: crystallang/crystal:1.3.2-alpine
steps:
- name: Download Crystal source
uses: actions/checkout@v2
Expand All @@ -23,7 +23,7 @@ jobs:
openssl111:
runs-on: ubuntu-latest
name: "OpenSSL 1.1.1"
container: crystallang/crystal:1.3.1-alpine
container: crystallang/crystal:1.3.2-alpine
steps:
- name: Download Crystal source
uses: actions/checkout@v2
Expand All @@ -36,7 +36,7 @@ jobs:
libressl31:
runs-on: ubuntu-latest
name: "LibreSSL 3.1"
container: crystallang/crystal:1.3.1-alpine
container: crystallang/crystal:1.3.2-alpine
steps:
- name: Download Crystal source
uses: actions/checkout@v2
Expand All @@ -51,7 +51,7 @@ jobs:
libressl34:
runs-on: ubuntu-latest
name: "LibreSSL 3.4"
container: crystallang/crystal:1.3.1-alpine
container: crystallang/crystal:1.3.2-alpine
steps:
- name: Download Crystal source
uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on: [push, pull_request]
jobs:
linux-job:
runs-on: ubuntu-latest
container: crystallang/crystal:1.3.1-build
container: crystallang/crystal:1.3.2-build
steps:
- name: Download Crystal source
uses: actions/checkout@v2
Expand Down
6 changes: 3 additions & 3 deletions bin/ci
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ format() {
prepare_build() {
on_linux verify_linux_environment

on_osx curl -L https://github.com/crystal-lang/crystal/releases/download/1.3.1/crystal-1.3.1-1-darwin-universal.tar.gz -o ~/crystal.tar.gz
on_osx 'pushd ~;gunzip -c ~/crystal.tar.gz | tar xopf -;mv crystal-1.3.1-1 crystal;popd'
on_osx curl -L https://github.com/crystal-lang/crystal/releases/download/1.3.2/crystal-1.3.2-1-darwin-universal.tar.gz -o ~/crystal.tar.gz
on_osx 'pushd ~;gunzip -c ~/crystal.tar.gz | tar xopf -;mv crystal-1.3.2-1 crystal;popd'

# These commands may take a few minutes to run due to the large size of the repositories.
# This restriction has been made on GitHub's request because updating shallow
Expand Down Expand Up @@ -189,7 +189,7 @@ with_build_env() {

on_linux verify_linux_environment

export DOCKER_TEST_PREFIX="${DOCKER_TEST_PREFIX:=crystallang/crystal:1.3.1}"
export DOCKER_TEST_PREFIX="${DOCKER_TEST_PREFIX:=crystallang/crystal:1.3.2}"

case $ARCH in
x86_64)
Expand Down
40 changes: 40 additions & 0 deletions scripts/release-update.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/usr/bin/env sh
straight-shoota marked this conversation as resolved.
Show resolved Hide resolved
#
# This helper updates all references to the previous Crystal release as bootstrap version with a new release.
#
# Usage:
#
# scripts/release-update.sh 1.3.0
#
# See Crystal release checklist: https://github.com/crystal-lang/distribution-scripts/blob/master/processes/crystal-release.md#post-release
set -eu

CRYSTAL_VERSION=$1

# Edit PREVIOUS_CRYSTAL_BASE_URL in .circleci/config.yml
sed -i -E "s|[0-9.]+/crystal-[0-9.]+-[0-9]|$CRYSTAL_VERSION/crystal-$CRYSTAL_VERSION-1|g" .circleci/config.yml

# Edit DOCKER_TEST_PREFIX in bin/ci
sed -i -E "s|crystallang/crystal:[0-9.]+|crystallang/crystal:$CRYSTAL_VERSION|" bin/ci

# Edit prepare_build on_osx download package and folder
sed -i -E "s|[0-9.]+/crystal-[0-9.]+-[0-9]|$CRYSTAL_VERSION/crystal-$CRYSTAL_VERSION-1|g" bin/ci
sed -i -E "s|crystal-[0-9.]+-[0-9]|crystal-$CRYSTAL_VERSION-1|g" bin/ci

# Edit .github/workflows/*.yml to point to docker image
# Update the patch version of the latest entry if same minor version to have only one item per minor version
sed -i -E "/crystal_bootstrap_version:/ s/(, ${CRYSTAL_VERSION%.*}\.[0-9]*)?\]\$/, $CRYSTAL_VERSION]/" .github/workflows/linux.yml
sed -i -E "s|crystallang/crystal:[0-9.]+|crystallang/crystal:$CRYSTAL_VERSION|g" .github/workflows/*.yml

# Edit shell.nix latestCrystalBinary using nix-prefetch-url --unpack <url>
darwin_url="https://github.com/crystal-lang/crystal/releases/download/$CRYSTAL_VERSION/crystal-$CRYSTAL_VERSION-1-darwin-universal.tar.gz"
darwin_sha=$(nix-prefetch-url --unpack $darwin_url)

sed -i -E "s|https://github.com/crystal-lang/crystal/releases/download/[0-9.]+/crystal-[0-9.]+-[0-9]-darwin-universal.tar.gz|$darwin_url|" shell.nix
sed -i -E "/darwin-universal\.tar\.gz/ {n;s|sha256:[^\"]+|sha256:$darwin_sha|}" shell.nix

linux_url="https://github.com/crystal-lang/crystal/releases/download/$CRYSTAL_VERSION/crystal-$CRYSTAL_VERSION-1-darwin-universal.tar.gz"
linux_sha=$(nix-prefetch-url --unpack $linux_url)

sed -i -E "s|https://github.com/crystal-lang/crystal/releases/download/[0-9.]+/crystal-[0-9.]+-[0-9]-linux-x86_64.tar.gz|$linux_url|" shell.nix
sed -i -E "/darwin-universal\.tar\.gz/ {n;s|sha256:[^\"]+|sha256:$linux_sha|}" shell.nix
8 changes: 4 additions & 4 deletions shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ let
# Hashes obtained using `nix-prefetch-url --unpack <url>`
latestCrystalBinary = genericBinary ({
x86_64-darwin = {
url = "https://github.com/crystal-lang/crystal/releases/download/1.3.1/crystal-1.3.1-1-darwin-universal.tar.gz";
sha256 = "sha256:18cfdp4k2cfnawxgg8k2pzy0657v5cl7sj8kyz76va5ajhrdws66";
url = "https://github.com/crystal-lang/crystal/releases/download/1.3.2/crystal-1.3.2-1-darwin-universal.tar.gz";
sha256 = "sha256:1jxc5c82wxigza2z0ck51dnwpvfzba0gsczrjxgfjysqn6ki7v3q";
beta-ziliani marked this conversation as resolved.
Show resolved Hide resolved
};

x86_64-linux = {
url = "https://github.com/crystal-lang/crystal/releases/download/1.3.1/crystal-1.3.1-1-darwin-universal.tar.gz";
sha256 = "sha256:18cfdp4k2cfnawxgg8k2pzy0657v5cl7sj8kyz76va5ajhrdws66";
url = "https://github.com/crystal-lang/crystal/releases/download/1.3.2/crystal-1.3.2-1-darwin-universal.tar.gz";
sha256 = "sha256:1jxc5c82wxigza2z0ck51dnwpvfzba0gsczrjxgfjysqn6ki7v3q";
};
}.${pkgs.stdenv.system});

Expand Down