Skip to content

Commit

Permalink
Release v0.16.1
Browse files Browse the repository at this point in the history
  • Loading branch information
stepchowfun committed Dec 4, 2020
1 parent 92570ca commit 75886a9
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 51 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
if: github.event_name == 'push'
- uses: stepchowfun/toast/.github/actions/toast@master
with:
tasks: build check test lint run release_musl
tasks: build check test lint run release
repo: stephanmisc/toast
write_remote_cache: ${{ github.event_name == 'push' }}

Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.16.1] - 2020-12-04

### Changed
- This version is the same as 0.16.0, except for Linux we now distribute musl binaries in addition to the glibc binaries. The `stephanmisc/docuum` Docker image is also much smaller now thanks to switching to Alpine Linux (with the new musl release) over Debian Slim.

## [0.16.0] - 2020-10-12

### Changed
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "docuum"
version = "0.16.0"
version = "0.16.1"
authors = ["Stephan Boyer <stephan@stephanboyer.com>"]
edition = "2018"
description = "LRU eviction of Docker images."
Expand Down
30 changes: 4 additions & 26 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,33 +1,11 @@
# A base image with glibc
FROM debian:buster-slim
# A minimal base image
FROM alpine:3.12.1

# Install the Docker CLI.
RUN \
apt-get update && \
apt-get install --yes \
apt-transport-https \
ca-certificates \
curl \
gnupg2 \
software-properties-common \
&& \
curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - && \
add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/debian buster stable" && \
apt-get update && \
apt-get install --yes docker-ce-cli && \
apt-get remove --yes \
apt-transport-https \
ca-certificates \
curl \
gnupg2 \
software-properties-common \
&& \
apt-get autoremove --yes && \
rm -rf /var/lib/apt/lists/*
RUN apk add --no-cache docker-cli

# Install Docuum.
COPY release/docuum-x86_64-unknown-linux-gnu /usr/local/bin/docuum
COPY release/docuum-x86_64-unknown-linux-musl /usr/local/bin/docuum

# Set the entrypoint to Docuum. Note that Docuum is not intended to be run as
# an init process, so be sure to pass `--init` to `docker run`.
Expand Down
10 changes: 7 additions & 3 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ set -euo pipefail
# 1. Bump the version in `Cargo.toml`, run `cargo build` to update `Cargo.lock`, and update
# `CHANGELOG.md` with information about the new version. Ship those changes as a single pull
# request.
# 2. Run this script and upload the files in the `release` directory to GitHub as release artifacts.
# 2. Run this script on an x86-64 machine and upload the files in the `release` directory to GitHub
# as release artifacts.
# 3. Build and upload the Docker image:
# docker build --tag stephanmisc/docuum:latest --tag stephanmisc/docuum:X.Y.Z .
# docker push stephanmisc/docuum:latest
Expand All @@ -23,7 +24,7 @@ set -euo pipefail
rm -rf target/release
cargo build --release

# x86-64 GNU/Linux build
# x86-64 GNU/Linux builds
rm -rf artifacts
toast release

Expand All @@ -32,17 +33,20 @@ set -euo pipefail
mkdir release

# Copy the artifacts into the `release` directory.
cp artifacts/docuum-x86_64-unknown-linux-gnu release/docuum-x86_64-unknown-linux-gnu
cp target/release/docuum release/docuum-x86_64-apple-darwin
cp artifacts/docuum-x86_64-unknown-linux-gnu release/docuum-x86_64-unknown-linux-gnu
cp artifacts/docuum-x86_64-unknown-linux-musl release/docuum-x86_64-unknown-linux-musl

# Compute checksums of the artifacts.
cd release
shasum --algorithm 256 --binary docuum-x86_64-apple-darwin > docuum-x86_64-apple-darwin.sha256
shasum --algorithm 256 --binary docuum-x86_64-unknown-linux-gnu > docuum-x86_64-unknown-linux-gnu.sha256
shasum --algorithm 256 --binary docuum-x86_64-unknown-linux-musl > docuum-x86_64-unknown-linux-musl.sha256

# Verify the checksums.
shasum --algorithm 256 --check --status docuum-x86_64-apple-darwin.sha256
shasum --algorithm 256 --check --status docuum-x86_64-unknown-linux-gnu.sha256
shasum --algorithm 256 --check --status docuum-x86_64-unknown-linux-musl.sha256

# Publish to crates.io.
cargo publish
Expand Down
21 changes: 2 additions & 19 deletions toast.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,29 +180,12 @@ tasks:
output_paths:
- artifacts
user: user
command: |
set -euo pipefail
. $HOME/.cargo/env
cargo build --release
mkdir artifacts
sha256sum --binary target/release/docuum
cp target/release/docuum artifacts/docuum-x86_64-unknown-linux-gnu
release_musl:
description: >-
Build the program in release mode (with musl instead of glibc) and export the binary to the
`artifacts` directory.
dependencies:
- fetch_crates
input_paths:
- src
output_paths:
- artifacts
user: user
command: |
set -euo pipefail
. $HOME/.cargo/env
rustup target add x86_64-unknown-linux-musl
cargo build --release
cargo build --release --target x86_64-unknown-linux-musl
mkdir artifacts
cp target/release/docuum artifacts/docuum-x86_64-unknown-linux-gnu
cp target/x86_64-unknown-linux-musl/release/docuum artifacts/docuum-x86_64-unknown-linux-musl

0 comments on commit 75886a9

Please sign in to comment.