From 43788cac9a0cb957605fbd16299d04d36a7e0411 Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Wed, 22 Apr 2020 13:32:36 -0700 Subject: [PATCH] Fix `bin/package` Also, To more easily test the `bin/package` script, build and publish packages for all tags, not just those that start with `v`. type: fixed --- .github/workflows/build.yaml | 6 +++--- CHANGELOG.md | 7 ++++++- bin/gen/src/command_ext.rs | 2 ++ bin/package | 17 +++++++++-------- 4 files changed, 20 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 1783966..4445113 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -5,7 +5,7 @@ on: branches: - master tags: - - v*.*.* + - '*' pull_request: branches: - master @@ -135,13 +135,13 @@ jobs: - name: Package id: package - if: startsWith(github.ref, 'refs/tags/v') + if: startsWith(github.ref, 'refs/tags/') shell: bash run: ./bin/package ${{github.ref}} ${{matrix.os}} ${{matrix.target}} - name: Publish uses: softprops/action-gh-release@v1 - if: startsWith(github.ref, 'refs/tags/v') + if: startsWith(github.ref, 'refs/tags/') with: draft: false files: ${{steps.package.outputs.archive}} diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c00c8e..533ea84 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,14 @@ Changelog ========= +UNRELEASED - 2020-04-23 +----------------------- +- :bug: [`xxxxxxxxxxxx`](https://github.com/casey/intermodal/commits/master) Fix `bin/package` - _Casey Rodarmor _ + + [v0.1.7](https://github.com/casey/intermodal/releases/tag/v0.1.7) - 2020-04-22 ------------------------------------------------------------------------------ -- :bookmark: [`xxxxxxxxxxxx`](https://github.com/casey/intermodal/commits/master) Release v0.1.7 - _Casey Rodarmor _ +- :bookmark: [`f217ac659a14`](https://github.com/casey/intermodal/commit/f217ac659a145f4385b68f20a86b610a02f679f5) Release v0.1.7 - _Casey Rodarmor _ - :zap: [`25ac072985f8`](https://github.com/casey/intermodal/commit/25ac072985f8799474298e6922043746888c0c06) Allow positional input to `imdl torrent show` - Fixes [#375](https://github.com/casey/intermodal/issues/375) - _Casey Rodarmor _ - :bug: [`cecd2f66a5d6`](https://github.com/casey/intermodal/commit/cecd2f66a5d6a6b44f27f8ca499e359d82d29ab7) Fix help strings - _Casey Rodarmor _ - :zap: [`ebec2d591a7a`](https://github.com/casey/intermodal/commit/ebec2d591a7a0e2a2c4cd55217db4ba46b5dd9ed) Allow positional shell to `imdl completions` - Fixes [#375](https://github.com/casey/intermodal/issues/375) - _Casey Rodarmor _ diff --git a/bin/gen/src/command_ext.rs b/bin/gen/src/command_ext.rs index aca743e..f7eda9b 100644 --- a/bin/gen/src/command_ext.rs +++ b/bin/gen/src/command_ext.rs @@ -8,6 +8,8 @@ pub(crate) trait CommandExt { impl CommandExt for Command { #[throws] fn out(&mut self) -> String { + info!("Running {:?}…", self); + let output = self .stdout(Stdio::piped()) .stderr(Stdio::inherit()) diff --git a/bin/package b/bin/package index 5499497..4f0d57c 100755 --- a/bin/package +++ b/bin/package @@ -17,13 +17,12 @@ echo "Building $bin..." case $os in ubuntu-latest) - sudo apt-get help2man install musl-tools + sudo apt install help2man musl-tools ;; macos-latest) brew install help2man ;; windows-latest) - choco install gnuwin ;; esac @@ -43,11 +42,6 @@ rm -rf completions mkdir completions $executable completions --dir completions -echo "Building man pages..." -rm -rf man -mkdir man -cargo run --package gen man - echo "Copying release files..." mkdir dist cp -r \ @@ -59,9 +53,16 @@ cp -r \ LICENSE \ README.md \ completions \ - man \ $dist +if [[ $os != windows-latest ]]; then + echo "Building man pages..." + rm -rf man + mkdir man + cargo run --package gen man + cp -r man $dist/man +fi + cd $dist echo "Creating release archive..." case $os in