diff --git a/.github/workflows/Generate-PR.yml b/.github/workflows/Generate-PR.yml index 5adcfd30a..6b706b953 100644 --- a/.github/workflows/Generate-PR.yml +++ b/.github/workflows/Generate-PR.yml @@ -9,9 +9,6 @@ on: required: false type: boolean default: 'false' - branch: - description: "Branch of chromebrew/chromebrew to run on, if different from this branch." - required: false pr_title: description: "Title of PR" required: false @@ -20,6 +17,9 @@ on: required: false type: boolean default: 'true' + branch: + description: "Branch of chromebrew/chromebrew to run on, if different from this branch." + required: false env: BRANCH: ${{ inputs.branch || github.ref_name }} permissions: @@ -399,7 +399,7 @@ jobs: echo -e "&& yes | crew upgrade\n\`\`\`" >> /tmp/pr.txt cat /tmp/pr.txt [[ $DRAFT_PR == 'true' ]] && export PR_DRAFT_FLAG='-d' - PR_NUMBER=$(gh pr list -L 1 -s all -H${{ inputs.branch || github.ref_name }}| cut -f1) + PR_NUMBER=$(gh pr list -L 1 -s open -H ${{ inputs.branch || github.ref_name }} | cut -f1) echo "PR title is: $(echo "${{ inputs.pr_title || inputs.branch || github.ref_name }}" | sed -e "s/^'//" -e "s/'$//") — ${CHANGED_PACKAGES}" if [[ -z ${PR_NUMBER} ]]; then PR_NUMBER=$(gh pr create ${PR_DRAFT_FLAG} --reviewer chromebrew/active --title "$(echo "${{ inputs.pr_title || inputs.branch || github.ref_name }}" | sed -e "s/^'//" -e "s/'$//") — ${CHANGED_PACKAGES}" -F /tmp/pr.txt | rev | cut -d"/" -f1 | rev) diff --git a/lib/buildsystems/rust.rb b/lib/buildsystems/rust.rb index 60a1b9512..f43f5b304 100644 --- a/lib/buildsystems/rust.rb +++ b/lib/buildsystems/rust.rb @@ -1,3 +1,4 @@ +require 'io/console' require_relative '../package' require_relative '../require_gem' require_relative '../report_buildsystem_methods' @@ -6,16 +7,20 @@ class RUST < Package property :rust_channel, :rust_flags, :rust_features, :rust_install_path, :rust_options, :rust_packages, :rust_release_profile, :rust_targets, :pre_rust_options, :rust_build_extras, :rust_install_extras def self.build + # From lib/progress_bar.rb ... + _, @terminal_w = !IO.console&.console_mode || IO.console&.winsize == [0, 0] ? [25, 80] : IO.console&.winsize + @rustflags = "#{ENV.fetch('RUSTFLAGS', nil)} #{@rust_flags}" rust_env = { - CARGO_TERM_COLOR: 'always', - CARGO_TERM_PROGRESS_WHEN: 'always', - LD: 'mold', - LIBRARY_PATH: CREW_LIB_PREFIX, - PATH: "#{CREW_PREFIX}/share/cargo/bin:" + ENV.fetch('PATH', nil), - RUSTFLAGS: @rustflags - }.transform_keys(&:to_s) + CARGO_TERM_COLOR: 'always', + CARGO_TERM_PROGRESS_WHEN: 'always', + CARGO_TERM_PROGRESS_WIDTH: @terminal_w.to_s, + LD: 'mold', + LIBRARY_PATH: CREW_LIB_PREFIX, + PATH: "#{CREW_PREFIX}/share/cargo/bin:" + ENV.fetch('PATH', nil), + RUSTFLAGS: @rustflags + }.transform_keys(&:to_s) @channel_flag = @rust_channel.to_s.empty? ? '' : "+#{@rust_channel}" @features = @rust_features.to_s.empty? ? '' : "--features #{@rust_features}" @@ -43,12 +48,13 @@ class RUST < Package def self.install rust_env = { - CARGO_TERM_COLOR: 'always', - CARGO_TERM_PROGRESS_WHEN: 'always', - LD: 'mold', - LIBRARY_PATH: CREW_LIB_PREFIX, - PATH: "#{CREW_PREFIX}/share/cargo/bin:" + ENV.fetch('PATH', nil), - RUSTFLAGS: @rustflags + CARGO_TERM_COLOR: 'always', + CARGO_TERM_PROGRESS_WHEN: 'always', + CARGO_TERM_PROGRESS_WIDTH: @terminal_w.to_s, + LD: 'mold', + LIBRARY_PATH: CREW_LIB_PREFIX, + PATH: "#{CREW_PREFIX}/share/cargo/bin:" + ENV.fetch('PATH', nil), + RUSTFLAGS: @rustflags }.transform_keys(&:to_s) @rust_install_path.split.each do |path| diff --git a/packages/edit.rb b/packages/edit.rb index 24aef0ddf..962abdd67 100644 --- a/packages/edit.rb +++ b/packages/edit.rb @@ -3,7 +3,7 @@ require 'buildsystems/rust' class Edit < RUST description 'A simple editor for simple needs.' homepage 'https://github.com/microsoft/edit' - version '1.1.0' + version '1.2.0' license 'MIT' compatibility 'all' source_url 'https://github.com/microsoft/edit.git' @@ -11,10 +11,10 @@ class Edit < RUST binary_compression 'tar.zst' binary_sha256({ - aarch64: '14e24a53daeefb85850b8ba4a8ab67c59b0da24bcfb7266f43f70f1d8c28cd00', - armv7l: '14e24a53daeefb85850b8ba4a8ab67c59b0da24bcfb7266f43f70f1d8c28cd00', - i686: '6a6dd916d54e402428f064a4e1dd8c33150ab9db68737690f8e9730138d9569c', - x86_64: '25c47a29e12df6ff098c085d31f877724ee686f58bef55f83a511ec307e5a188' + aarch64: '771cae3efe1afa52aef44c5f30a30ddc9420e9d22a3480bb1ae22dbb1a181191', + armv7l: '771cae3efe1afa52aef44c5f30a30ddc9420e9d22a3480bb1ae22dbb1a181191', + i686: '560f03e9dfe5a2ae2e10c677ca99ca34282d12b7c9035595afb946e9ad1b9465', + x86_64: 'b64eceb2e051b9621b4c61caa6c5221c70e948d6e7d6a3f01138ed1f2bac3b32' }) depends_on 'gcc_lib' # R