Skip to content

Commit ae171d7

Browse files
committed
set proper release version
1 parent 37bf422 commit ae171d7

2 files changed

Lines changed: 42 additions & 8 deletions

File tree

.github/workflows/build-and-release.yml

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,24 @@ jobs:
6767
needs: build
6868
runs-on: ubuntu-latest
6969
steps:
70+
- name: Checkout code
71+
uses: actions/checkout@v2
72+
73+
- name: Build await to get version
74+
run: |
75+
gcc await.c -o await -lpthread
76+
77+
- name: Get version from await CLI
78+
id: get_version
79+
run: |
80+
VERSION=$(./await --version)
81+
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
82+
echo "Version: $VERSION"
83+
7084
- name: Check if Release Exists
7185
id: check_release
7286
run: |
73-
gh release view 1.0.8 || echo "Release does not exist"
87+
gh release view ${{ steps.get_version.outputs.VERSION }} || echo "Release does not exist"
7488
7589
- name: Create or Update Release
7690
id: create_update_release
@@ -79,16 +93,16 @@ jobs:
7993
env:
8094
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8195
with:
82-
tag_name: 1.0.8
83-
release_name: 1.0.8
84-
body: Fixed ctrl-c handling when it's run from bash script
96+
tag_name: ${{ steps.get_version.outputs.VERSION }}
97+
release_name: ${{ steps.get_version.outputs.VERSION }}
98+
body: Release version ${{ steps.get_version.outputs.VERSION }}
8599
draft: false
86100
prerelease: false
87101

88102
- name: Update Release Archives
89103
if: steps.check_release.outputs.exists == 'true'
90104
run: |
91-
gh release upload 1.0.8 archives/* --clobber
105+
gh release upload ${{ steps.get_version.outputs.VERSION }} archives/* --clobber
92106
93107
- name: Download Artifact
94108
uses: actions/download-artifact@v4
@@ -97,14 +111,14 @@ jobs:
97111
run: |
98112
mkdir -p archives
99113
tree
100-
tar -czvf archives/await-1.0.8-aarch64-x86_64-apple-darwin.tar.gz -C await-macos-latest .
101-
tar -czvf archives/await-1.0.8-x86_64-unknown-linux-gnu.tar.gz -C await-ubuntu-latest .
114+
tar -czvf archives/await-${{ steps.get_version.outputs.VERSION }}-aarch64-x86_64-apple-darwin.tar.gz -C await-macos-latest .
115+
tar -czvf archives/await-${{ steps.get_version.outputs.VERSION }}-x86_64-unknown-linux-gnu.tar.gz -C await-ubuntu-latest .
102116
tree
103117
104118
- name: Upload Release Artifacts
105119
uses: softprops/action-gh-release@v1
106120
with:
107121
files: archives/*
108-
tag_name: 1.0.8
122+
tag_name: ${{ steps.get_version.outputs.VERSION }}
109123
env:
110124
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,26 @@ sudo systemctl restart redis; await 'socat -u OPEN:/dev/null UNIX-CONNECT:/tmp/r
9898

9999
<img src='demo/6.gif' width='100%'></img>
100100

101+
### Watch command output with diff highlighting
102+
```bash
103+
# Like watch -d, highlight only the changing parts
104+
await 'date +%s' --diff --forever --stdout --silent --interval 1000
105+
106+
# Monitor API responses and highlight changes
107+
await 'curl -s https://api.example.com/status | jq .counter' --diff --forever --stdout --silent
108+
109+
# Watch file changes with visual diff
110+
await 'wc -l *.log' --diff --change --forever --stdout
111+
```
112+
113+
### Better stderr handling
114+
```bash
115+
# Suppress stderr without affecting pipes or command structure
116+
await 'curl -s https://unreliable-api.com || echo failed' --no-stderr
117+
118+
# Clean output even with noisy commands
119+
await 'some-verbose-command' 'another-command' --no-stderr --stdout --silent
120+
```
101121

102122
## --help
103123
```bash

0 commit comments

Comments
 (0)