Skip to content

Commit

Permalink
Merge branch 'master' into issue-1850
Browse files Browse the repository at this point in the history
  • Loading branch information
AstroProfundis authored Apr 20, 2022
2 parents bed50e8 + e5b8861 commit aa88c70
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 3 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/release-tiup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ jobs:
release:
runs-on: ubuntu-latest
timeout-minutes: 30
outputs:
REL_VER: ${{ steps.build_tiup.outputs.REL_VER }}
strategy:
fail-fast: true
matrix:
Expand Down Expand Up @@ -195,3 +197,40 @@ jobs:
omitNameDuringUpdate: true
prerelease: ${{ github.event.release.prerelease }}
token: ${{ secrets.GITHUB_TOKEN }}

brew-upgrade:
runs-on: ubuntu-latest
timeout-minutes: 5
needs: release
steps:
- name: Check out brew code
uses: actions/checkout@v3
continue-on-error: true
if: github.event_name == 'release'
with:
repository: pingcap/homebrew-brew
persist-credentials: false
ref: master
path: ${{ github.workspace }}/homebrew-brew
fetch-depth: 0

- name: Update and Check tiup version
id: update_version
working-directory: ${{ github.workspace }}/homebrew-brew
continue-on-error: true
if: github.event_name == 'release'
run: |
sed -i 's/version.*/version "${{ needs.release.outputs.REL_VER }}"/g' Formula/tiup.rb
sed -i 's/tag:.*/tag: "${{ needs.release.outputs.REL_VER }}"/g' Formula/tiup.rb
cat Formula/tiup.rb
- name: Push new homebrew
uses: actions-js/push@master
continue-on-error: true
if: github.event_name == 'release'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
directory: ${{ github.workspace }}/homebrew-brew
message: "tiup: ${{ needs.release.outputs.REL_VER }}"
branch: master
repository: pingcap/homebrew-brew
2 changes: 1 addition & 1 deletion embed/templates/scripts/run_dm-master.sh.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ exec bin/dm-master/dm-master \
--v1-sources-path="{{.V1SourcePath}}" \
{{- end}}
--name="{{.Name}}" \
--master-addr="{{.IP}}:{{.Port}}" \
--master-addr="0.0.0.0:{{.Port}}" \
--advertise-addr="{{.IP}}:{{.Port}}" \
--peer-urls="{{.Scheme}}://{{.IP}}:{{.PeerPort}}" \
--advertise-peer-urls="{{.Scheme}}://{{.IP}}:{{.PeerPort}}" \
Expand Down
2 changes: 1 addition & 1 deletion embed/templates/scripts/run_dm-master_scale.sh.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ exec numactl --cpunodebind={{.NumaNode}} --membind={{.NumaNode}} bin/dm-master/d
exec bin/dm-master/dm-master \
{{- end}}
--name="{{.Name}}" \
--master-addr="{{.IP}}:{{.Port}}" \
--master-addr="0.0.0.0:{{.Port}}" \
--advertise-addr="{{.IP}}:{{.Port}}" \
--peer-urls="{{.Scheme}}://{{.IP}}:{{.PeerPort}}" \
--advertise-peer-urls="{{.Scheme}}://{{.IP}}:{{.PeerPort}}" \
Expand Down
2 changes: 1 addition & 1 deletion embed/templates/scripts/run_dm-worker.sh.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ exec numactl --cpunodebind={{.NumaNode}} --membind={{.NumaNode}} bin/dm-worker/d
exec bin/dm-worker/dm-worker \
{{- end}}
--name="{{.Name}}" \
--worker-addr="{{.IP}}:{{.Port}}" \
--worker-addr="0.0.0.0:{{.Port}}" \
--advertise-addr="{{.IP}}:{{.Port}}" \
--log-file="{{.LogDir}}/dm-worker.log" \
--join="{{template "MasterList" .Endpoints}}" \
Expand Down

0 comments on commit aa88c70

Please sign in to comment.