Updating release workflows to use a script instead of repeating and adding scripts for updating and resetting dependencies if attempting to build packages locally.
This commit is contained in:
parent
06a7a31847
commit
b2a21addc3
|
@ -48,18 +48,7 @@ jobs:
|
|||
|
||||
- run: yarn install --frozen-lockfile
|
||||
- name: Update versions
|
||||
run: |
|
||||
version=$(cat lerna.json \
|
||||
| grep version \
|
||||
| head -1 \
|
||||
| awk -F: '{gsub(/"/,"",$2);gsub(/[[:space:]]*/,"",$2); print $2}' \
|
||||
| sed 's/[",]//g')
|
||||
echo "Setting version $version"
|
||||
yarn lerna exec "yarn version --no-git-tag-version --new-version=$version"
|
||||
echo "Updating dependencies"
|
||||
node scripts/syncLocalDependencies.js $version
|
||||
echo "Syncing yarn workspace"
|
||||
yarn
|
||||
run: ./scripts/updateVersions.sh
|
||||
- run: yarn build
|
||||
- run: yarn build:sdk
|
||||
|
||||
|
|
|
@ -41,18 +41,7 @@ jobs:
|
|||
|
||||
- run: yarn install --frozen-lockfile
|
||||
- name: Update versions
|
||||
run: |
|
||||
version=$(cat lerna.json \
|
||||
| grep version \
|
||||
| head -1 \
|
||||
| awk -F: '{gsub(/"/,"",$2);gsub(/[[:space:]]*/,"",$2); print $2}' \
|
||||
| sed 's/[",]//g')
|
||||
echo "Setting version $version"
|
||||
yarn lerna exec "yarn version --no-git-tag-version --new-version=$version"
|
||||
echo "Updating dependencies"
|
||||
node scripts/syncLocalDependencies.js $version
|
||||
echo "Syncing yarn workspace"
|
||||
yarn
|
||||
run: ./scripts/updateVersions.sh
|
||||
- run: yarn lint
|
||||
- run: yarn build
|
||||
- run: yarn build:sdk
|
||||
|
|
|
@ -47,33 +47,11 @@ jobs:
|
|||
- name: Run Yarn
|
||||
run: yarn
|
||||
- name: Update versions
|
||||
run: |
|
||||
version=$(cat lerna.json \
|
||||
| grep version \
|
||||
| head -1 \
|
||||
| awk -F: '{gsub(/"/,"",$2);gsub(/[[:space:]]*/,"",$2); print $2}' \
|
||||
| sed 's/[",]//g')
|
||||
echo "Setting version $version"
|
||||
yarn lerna exec "yarn version --no-git-tag-version --new-version=$version"
|
||||
echo "Updating dependencies"
|
||||
node scripts/syncLocalDependencies.js $version
|
||||
echo "Syncing yarn workspace"
|
||||
yarn
|
||||
run: ./scripts/updateVersions.sh
|
||||
- name: Runt Yarn Lint
|
||||
run: yarn lint
|
||||
- name: Update versions
|
||||
run: |
|
||||
version=$(cat lerna.json \
|
||||
| grep version \
|
||||
| head -1 \
|
||||
| awk -F: '{gsub(/"/,"",$2);gsub(/[[:space:]]*/,"",$2); print $2}' \
|
||||
| sed 's/[",]//g')
|
||||
echo "Setting version $version"
|
||||
yarn lerna exec "yarn version --no-git-tag-version --new-version=$version"
|
||||
echo "Updating dependencies"
|
||||
node scripts/syncLocalDependencies.js $version
|
||||
echo "Syncing yarn workspace"
|
||||
yarn
|
||||
run: ./scripts/updateVersions.sh
|
||||
- name: Run Yarn Build
|
||||
run: yarn build:docker:pre
|
||||
- name: Login to Docker Hub
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
echo "Resetting package versions"
|
||||
yarn lerna exec "yarn version --no-git-tag-version --new-version=0.0.0"
|
||||
echo "Updating dependencies"
|
||||
node scripts/syncLocalDependencies.js "0.0.0"
|
||||
git checkout package.json
|
||||
echo "Package versions reset!"
|
|
@ -0,0 +1,12 @@
|
|||
#!/bin/bash
|
||||
version=$(cat lerna.json \
|
||||
| grep version \
|
||||
| head -1 \
|
||||
| awk -F: '{gsub(/"/,"",$2);gsub(/[[:space:]]*/,"",$2); print $2}' \
|
||||
| sed 's/[",]//g')
|
||||
echo "Setting version $version"
|
||||
yarn lerna exec "yarn version --no-git-tag-version --new-version=$version"
|
||||
echo "Updating dependencies"
|
||||
node scripts/syncLocalDependencies.js $version
|
||||
echo "Syncing yarn workspace"
|
||||
yarn
|
Loading…
Reference in New Issue