👷 ci(circleci): use toolkit to update prlog
- change min_rust_version parameter to "1.88" - comment out release-prlog job to disable it temporarily - update workflow to use toolkit/make_release job with new parameters Signed-off-by: Jeremiah Russell <jerry@jrussell.ie>
This commit is contained in:
@@ -1,12 +1,12 @@
|
|||||||
version: 2.1
|
version: 2.1
|
||||||
|
|
||||||
parameters:
|
parameters:
|
||||||
min_rust_version:
|
|
||||||
type: string
|
|
||||||
default: "1.87"
|
|
||||||
fingerprint:
|
fingerprint:
|
||||||
type: string
|
type: string
|
||||||
default: SHA256:OkxsH8Z6Iim6WDJBaII9eTT9aaO1f3eDc6IpsgYYPVg
|
default: SHA256:OkxsH8Z6Iim6WDJBaII9eTT9aaO1f3eDc6IpsgYYPVg
|
||||||
|
min_rust_version:
|
||||||
|
type: string
|
||||||
|
default: "1.88"
|
||||||
# Version override for crate release (used when nextsv cannot calculate)
|
# Version override for crate release (used when nextsv cannot calculate)
|
||||||
# Set to empty string "" to use nextsv auto-detection
|
# Set to empty string "" to use nextsv auto-detection
|
||||||
crate_version_override:
|
crate_version_override:
|
||||||
@@ -593,71 +593,71 @@ jobs:
|
|||||||
package: << parameters.package >>
|
package: << parameters.package >>
|
||||||
verbosity: "-vv"
|
verbosity: "-vv"
|
||||||
|
|
||||||
# Release PRLOG/workspace
|
# # Release PRLOG/workspace
|
||||||
# Reads version from workspace (calculated by calculate-versions job)
|
# # Reads version from workspace (calculated by calculate-versions job)
|
||||||
release-prlog:
|
# release-prlog:
|
||||||
executor:
|
# executor:
|
||||||
name: toolkit/rust_env_rolling
|
# name: toolkit/rust_env_rolling
|
||||||
steps:
|
# steps:
|
||||||
- checkout
|
# - checkout
|
||||||
- attach_workspace:
|
# - attach_workspace:
|
||||||
at: /tmp
|
# at: /tmp
|
||||||
- add_ssh_keys:
|
# - add_ssh_keys:
|
||||||
fingerprints:
|
# fingerprints:
|
||||||
- << pipeline.parameters.fingerprint >>
|
# - << pipeline.parameters.fingerprint >>
|
||||||
- run:
|
# - run:
|
||||||
name: Remove original SSH key from agent
|
# name: Remove original SSH key from agent
|
||||||
command: |
|
# command: |
|
||||||
ssh-add -l
|
# ssh-add -l
|
||||||
# GitHub App integration doesn't create id_rsa.pub, handle gracefully
|
# # GitHub App integration doesn't create id_rsa.pub, handle gracefully
|
||||||
if [ -f ~/.ssh/id_rsa.pub ]; then
|
# if [ -f ~/.ssh/id_rsa.pub ]; then
|
||||||
ssh-add -d ~/.ssh/id_rsa.pub
|
# ssh-add -d ~/.ssh/id_rsa.pub
|
||||||
else
|
# else
|
||||||
echo "No id_rsa.pub found (GitHub App integration) - skipping removal"
|
# echo "No id_rsa.pub found (GitHub App integration) - skipping removal"
|
||||||
fi
|
# fi
|
||||||
ssh-add -l
|
# ssh-add -l
|
||||||
- toolkit/gpg_key
|
# - toolkit/gpg_key
|
||||||
- toolkit/git_config
|
# - toolkit/git_config
|
||||||
- run:
|
# - run:
|
||||||
name: Release PRLOG
|
# name: Release PRLOG
|
||||||
command: |
|
# command: |
|
||||||
set -exo pipefail
|
# set -exo pipefail
|
||||||
chmod +x scripts/*.sh
|
# chmod +x scripts/*.sh
|
||||||
|
|
||||||
# Load version from workspace (calculated by calculate-versions)
|
# # Load version from workspace (calculated by calculate-versions)
|
||||||
VERSION_FILE="/tmp/release-versions/workspace-version"
|
# VERSION_FILE="/tmp/release-versions/workspace-version"
|
||||||
if [ -f "$VERSION_FILE" ]; then
|
# if [ -f "$VERSION_FILE" ]; then
|
||||||
VERSION=$(cat "$VERSION_FILE")
|
# VERSION=$(cat "$VERSION_FILE")
|
||||||
echo "Loaded workspace version from workspace: $VERSION"
|
# echo "Loaded workspace version from workspace: $VERSION"
|
||||||
else
|
# else
|
||||||
echo "ERROR: Version file not found at $VERSION_FILE"
|
# echo "ERROR: Version file not found at $VERSION_FILE"
|
||||||
echo "This job requires calculate-versions to run first"
|
# echo "This job requires calculate-versions to run first"
|
||||||
exit 1
|
# exit 1
|
||||||
fi
|
# fi
|
||||||
|
|
||||||
if [ "$VERSION" = "none" ]; then
|
# if [ "$VERSION" = "none" ]; then
|
||||||
echo "No PRLOG release needed"
|
# echo "No PRLOG release needed"
|
||||||
exit 0
|
# exit 0
|
||||||
fi
|
# fi
|
||||||
|
|
||||||
# Check if tag already exists
|
# # Check if tag already exists
|
||||||
TAG="v${VERSION}"
|
# TAG="v${VERSION}"
|
||||||
git fetch --tags origin main
|
# git fetch --tags origin main
|
||||||
|
|
||||||
# Pull latest main (release-crate may have pushed commits)
|
# # Pull latest main (release-crate may have pushed commits)
|
||||||
git pull --rebase origin main
|
# git pull --rebase origin main
|
||||||
|
|
||||||
if git tag -l "$TAG" | grep -q .; then
|
# if git tag -l "$TAG" | grep -q .; then
|
||||||
echo "Tag $TAG already exists - updating PRLOG without new tag"
|
# echo "Tag $TAG already exists - updating PRLOG without new tag"
|
||||||
# Update PRLOG.md with the release date but don't create new tag
|
# # Update PRLOG.md with the release date but don't create new tag
|
||||||
./scripts/release-prlog.sh "$VERSION" --no-tag 2>/dev/null || \
|
# ./scripts/release-prlog.sh "$VERSION" --no-tag 2>/dev/null || \
|
||||||
./scripts/release-prlog.sh "$VERSION"
|
# ./scripts/release-prlog.sh "$VERSION"
|
||||||
git push origin main || echo "No changes to push"
|
# git push origin main || echo "No changes to push"
|
||||||
else
|
# else
|
||||||
echo "Creating new release for version $VERSION"
|
# echo "Creating new release for version $VERSION"
|
||||||
./scripts/release-prlog.sh "$VERSION"
|
# ./scripts/release-prlog.sh "$VERSION"
|
||||||
git push origin main --tags
|
# git push origin main --tags
|
||||||
fi
|
# fi
|
||||||
|
|
||||||
# Build release binary and upload to GitHub release for cargo-binstall
|
# Build release binary and upload to GitHub release for cargo-binstall
|
||||||
release-binary:
|
release-binary:
|
||||||
@@ -723,8 +723,13 @@ workflows:
|
|||||||
- bot-check
|
- bot-check
|
||||||
|
|
||||||
# Release PRLOG (after crate released)
|
# Release PRLOG (after crate released)
|
||||||
- release-prlog:
|
- toolkit/make_release:
|
||||||
requires: [release-cull-gmail]
|
requires: [release-cull-gmail]
|
||||||
context:
|
context:
|
||||||
- release
|
- release
|
||||||
- bot-check
|
- bot-check
|
||||||
|
ssh_fingerprint: << pipeline.parameters.fingerprint >>
|
||||||
|
min_rust_version: << pipeline.parameters.min_rust_version >>
|
||||||
|
when_cargo_release: false
|
||||||
|
when_use_workspace: false
|
||||||
|
pcu_update_prlog: true
|
||||||
|
|||||||
Reference in New Issue
Block a user