Skip to content

Commit

Permalink
fix: release process (#9728)
Browse files Browse the repository at this point in the history
* fix env variable of tag name location

* make tag name more robust, not just matching on strict "nightly" but containing nightly

* prefer using short version in foundryup to avoid cluttering stdout

* pass in tag name (cast to `nightly` if nightly build) during Docker build process

* requires prepare step

* use with instead of env

* env not available in step

* fix build tag

* add test tag for Docker

* pass down tag_name into Dockerfile.cross

* revert docker specific changes, do that as a follow up to unblock

* avoid whitespace diff
  • Loading branch information
zerosnacks authored Jan 21, 2025
1 parent f94ce46 commit fea3885
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ jobs:
attestations: write
name: ${{ matrix.target }} (${{ matrix.runner }})
runs-on: ${{ matrix.runner }}
env:
TAG_NAME: ${{ (env.IS_NIGHTLY == 'true' && 'nightly') || needs.prepare.outputs.tag_name }}
timeout-minutes: 240
needs: prepare
strategy:
Expand Down Expand Up @@ -136,6 +134,7 @@ jobs:
- name: Build binaries
env:
TAG_NAME: ${{ (env.IS_NIGHTLY == 'true' && 'nightly') || needs.prepare.outputs.tag_name }}
SVM_TARGET_PLATFORM: ${{ matrix.svm_target_platform }}
PLATFORM_NAME: ${{ matrix.platform }}
TARGET: ${{ matrix.target }}
Expand Down
2 changes: 1 addition & 1 deletion crates/common/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ fn main() -> Result<(), Box<dyn Error>> {
// if not on a tag: <BIN> 0.3.0-dev+ba03de0019.1737036656.debug
// if on a tag: <BIN> 0.3.0-stable+ba03de0019.1737036656.release
let tag_name = env::var("TAG_NAME").unwrap_or_else(|_| String::from("dev"));
let (is_nightly, version_suffix) = if tag_name == "nightly" {
let (is_nightly, version_suffix) = if tag_name.contains("nightly") {
(true, "-nightly".to_string())
} else {
(false, format!("-{tag_name}"))
Expand Down
10 changes: 5 additions & 5 deletions foundryup/foundryup
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -eo pipefail
# NOTE: if you make modifications to this script, please increment the version number.
# Major / minor: incremented for each stable release of Foundry.
# Patch: incremented for each change between stable releases.
FOUNDRYUP_INSTALLER_VERSION="0.3.0"
FOUNDRYUP_INSTALLER_VERSION="0.3.1"

BASE_DIR=${XDG_CONFIG_HOME:-$HOME}
FOUNDRY_DIR=${FOUNDRY_DIR:-"$BASE_DIR/.foundry"}
Expand Down Expand Up @@ -183,7 +183,7 @@ main() {
cp $FOUNDRY_VERSIONS_DIR/$FOUNDRYUP_TAG/$bin $bin_path

# Print installed msg
say "installed - $(ensure "$bin_path" --version)"
say "installed - $(ensure "$bin_path" -V)"

# Check if the default path of the binary is not in FOUNDRY_BIN_DIR
which_path="$(command -v "$bin" || true)"
Expand Down Expand Up @@ -304,14 +304,14 @@ list() {
say "${VERSION##*/}"
for bin in "${BINS[@]}"; do
bin_path="$VERSION/$bin"
say "- $(ensure "$bin_path" --version)"
say "- $(ensure "$bin_path" -V)"
done
printf "\n"
done
else
for bin in "${BINS[@]}"; do
bin_path="$FOUNDRY_BIN_DIR/$bin"
say "- $(ensure "$bin_path" --version)"
say "- $(ensure "$bin_path" -V)"
done
fi
exit 0
Expand All @@ -328,7 +328,7 @@ use() {
bin_path="$FOUNDRY_BIN_DIR/$bin"
cp $FOUNDRY_VERSION_DIR/$bin $bin_path
# Print usage msg
say "use - $(ensure "$bin_path" --version)"
say "use - $(ensure "$bin_path" -V)"
done
exit 0
else
Expand Down

0 comments on commit fea3885

Please sign in to comment.