Skip to content

Commit

Permalink
Rename amd64 to x86_64 and enforce v prefix on version tags
Browse files Browse the repository at this point in the history
  • Loading branch information
valeriansaliou committed Sep 5, 2023
1 parent f6dd4dc commit b5bcc1d
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
on:
push:
tags:
- "*.*"
- "v*.*.*"

name: Build and Release

Expand Down
8 changes: 3 additions & 5 deletions PACKAGING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@ We consider here the packaging flow of Bloom version `1.0.0` for Linux.
1. **How to bump Bloom version before a release:**
1. Bump version in `Cargo.toml` to `1.0.0`
2. Execute `cargo update` to bump `Cargo.lock`
3. Bump Debian package version in `debian/rules` to `1.0`
3. Bump Debian package version in `debian/rules` to `1.0.0`

2. **How to build Bloom, package it and release it on Crates, GitHub, Docker Hub and Packagecloud (multiple architectures):**
1. Tag the latest Git commit corresponding to the release `v1.0.0` with tag `1.0` (**this is important!**), and push the tag
1. Tag the latest Git commit corresponding to the release with tag `v1.0.0`, and push the tag
2. Wait for all release jobs to complete on the [actions](https://github.com/valeriansaliou/bloom/actions) page on GitHub
3. Download all release archives, and sign them locally using: `./scripts/sign_binaries.sh --version=1.0`
3. Download all release archives, and sign them locally using: `./scripts/sign_binaries.sh --version=1.0.0`
4. Publish a changelog and upload all the built archives, as well as their signatures on the [releases](https://github.com/valeriansaliou/bloom/releases) page on GitHub

Notice: upon packaging `x86_64` becomes `amd64`.
8 changes: 5 additions & 3 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/make -f

DISTRIBUTION = $(shell lsb_release -sr)
VERSION = 1.35
VERSION = 1.35.0
PACKAGEVERSION = $(VERSION)-0~$(DISTRIBUTION)0
URL = https://github.com/valeriansaliou/bloom/releases/download/$(VERSION)/
URL = https://github.com/valeriansaliou/bloom/releases/download/v$(VERSION)/

%:
dh $@ --with systemd
Expand All @@ -13,9 +13,11 @@ override_dh_auto_test:
override_dh_auto_build:
override_dh_auto_install:
$(eval ENV_ARCH := $(shell dpkg --print-architecture))
$(eval ENV_TARBALL := v$(VERSION)-$(ENV_ARCH).tar.gz)
$(eval ENV_ISA := $(shell if [ "$(ENV_ARCH)" = "amd64" ]; then echo "x86_64"; else echo "$(ENV_ARCH)"; fi))
$(eval ENV_TARBALL := v$(VERSION)-$(ENV_ISA).tar.gz)

echo "Architecture: $(ENV_ARCH)"
echo "Instruction Set: $(ENV_ISA)"
echo "Target: $(URL)$(ENV_TARBALL)"

wget -N --progress=dot:mega $(URL)$(ENV_TARBALL)
Expand Down
2 changes: 1 addition & 1 deletion scripts/release_binaries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ rc=0
pushd "$BASE_DIR" > /dev/null
echo "Executing release steps for Bloom v$BLOOM_VERSION..."

release_for_architecture "amd64" "x86_64-unknown-linux-musl" && \
release_for_architecture "x86_64" "x86_64-unknown-linux-musl" && \
release_for_architecture "armhf" "armv7-unknown-linux-musleabihf"
rc=$?

Expand Down
2 changes: 1 addition & 1 deletion scripts/sign_binaries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ rc=0
pushd "$BASE_DIR" > /dev/null
echo "Executing sign steps for Bloom v$BLOOM_VERSION..."

sign_for_architecture "amd64" && \
sign_for_architecture "x86_64" && \
sign_for_architecture "armhf"
rc=$?

Expand Down

0 comments on commit b5bcc1d

Please sign in to comment.