Skip to content

Commit

Permalink
chore: package ckb-cli
Browse files Browse the repository at this point in the history
  • Loading branch information
doitian committed Jun 28, 2019
1 parent 5096207 commit 1c031e8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,15 @@ jobs:
rustup_toolchain: '1.34.2-x86_64-pc-windows-msvc'
- script: make prod
displayName: Build
- script: |
curl -LO https://github.com/nervosnetwork/ckb-cli/releases/download/$(Build.SourceBranchName)/ckb-cli_$(Build.SourceBranchName)_x86_64-pc-windows-msvc.zip
displayName: Download ckb-cli
- powershell: |
mkdir ckb_$(Build.SourceBranchName)_x86_64-pc-windows-msvc
cp -r target/release/ckb.exe,README.md,CHANGELOG.md,COPYING,docs ckb_$(Build.SourceBranchName)_x86_64-pc-windows-msvc
cp rpc/README.md ckb_$(Build.SourceBranchName)_x86_64-pc-windows-msvc/docs/rpc.md
unzip ckb-cli_$(Build.SourceBranchName)_x86_64-pc-windows-msvc.zip
mv ckb-cli_$(Build.SourceBranchName)_x86_64-pc-windows-msvc/ckb-cli.exe ckb_$(Build.SourceBranchName)_x86_64-pc-windows-msvc/
displayName: Prepare archive
- task: ArchiveFiles@2
inputs:
Expand Down
8 changes: 8 additions & 0 deletions devtools/ci/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ cp -R devtools/init "releases/$PKG_NAME"
cp -R docs "releases/$PKG_NAME"
cp rpc/README.md "releases/$PKG_NAME/docs/rpc.md"

curl -LO "https://github.com/nervosnetwork/ckb-cli/releases/download/${TRAVIS_TAG}/ckb-cli_${TRAVIS_TAG}_${REL_PKG}"
if [ "${REL_PKG##*.}" = "zip" ]; then
unzip "ckb-cli_${TRAVIS_TAG}_${REL_PKG}"
else
tar -xzf "ckb-cli_${TRAVIS_TAG}_${REL_PKG}"
fi
mv "ckb-cli_${TRAVIS_TAG}_${REL_PKG%%.*}/ckb-cli" "releases/$PKG_NAME/ckb-cli"

pushd releases
if [ "${REL_PKG#*.}" = "tar.gz" ]; then
tar -czf $PKG_NAME.tar.gz $PKG_NAME
Expand Down

0 comments on commit 1c031e8

Please sign in to comment.