Use task in pipeline

This commit is contained in:
Mykola 2020-02-26 16:10:15 -08:00
parent e429ad9535
commit f4c8c2eb77
3 changed files with 18 additions and 11 deletions

View File

@ -21,10 +21,13 @@ steps:
versionSpec: '12.x'
displayName: Install Node.js
- script: |
- task: Bash@3
displayName: Install global dependency
inputs:
targetType: inline
script: |
sudo npm install -g typescript
sudo npm install -g ts-node
displayName: Install global dependency
- task: Npm@1
inputs:
@ -37,10 +40,15 @@ steps:
# path: $(npm_config_cache)
# displayName: Cache npm
- script: |
- task: Bash@3
displayName: Set git config
inputs:
targetType: inline
script: |
git config --global user.email "bot@trustwallet.com"
git config --global user.name "TrustWalletBot"
- script: sudo npm run checksum:erc20
workingDirectory: $(Build.SourcesDirectory)
displayName: Run checksum script

View File

@ -3,7 +3,6 @@
if [[ `git status --porcelain --untracked-files=no` ]]; then
git add .
git commit -m "Checksum ERC20 addresses [skip ci]"
echo Current branch
echo Pushing changes to branch: "$SYSTEM_PULLREQUEST_SOURCEBRANCH"
echo Current branch $(git branch)
git status

View File

@ -12,7 +12,7 @@ ethSidechains.forEach(chain => {
const isChecksum = web3.utils.checkAddressChecksum(addr)
if (!isChecksum) {
console.log(`Address ${addr} not in checksum`)
console.log(`Renaming non checksum ${addr} ...`)
const checksum = web3.utils.toChecksumAddress(addr)
const moveToChecksum = `git mv ${addr} ${checksum}-temp && git mv ${checksum}-temp ${checksum}`
const renamed = execSync(`cd ${assetsPath} && ${moveToChecksum}`, {encoding: "utf-8"})