Skip to content

Commit d25904a

Browse files
authored
feat(TU-34342): Address libs not being automatically bumped during release flow (#725)
* ci(TU-34342): Stop use of yarn upgrade - replicate functionality * ci(TU-34342): Clean yarn.lock
1 parent 3516dad commit d25904a

2 files changed

Lines changed: 3625 additions & 4242 deletions

File tree

scripts/release.sh

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -10,43 +10,43 @@ echo "-- setup git"
1010
git config --global user.email "you@example.com"
1111
git config --global user.name "Github Action"
1212

13-
# release vanilla lib
14-
echo "-- release vanilla lib"
13+
# release embed lib
14+
echo "-- release embed lib"
1515
cd $REPO_ROOT/packages/embed
1616
yarn release-vanilla
1717

18-
# bump vanilla lib
19-
echo "-- bump vanilla lib"
18+
# bump embed in embed-react
19+
echo "-- bump embed in embed-react"
20+
EMBED_VERSION=$(npm view @typeform/embed version)
21+
echo "Latest @typeform/embed version: $EMBED_VERSION"
2022
cd $REPO_ROOT/packages/embed-react
21-
yarn upgrade @typeform/embed
23+
sed -i.bak "s/\"@typeform\/embed\": \".*\"/\"@typeform\/embed\": \"$EMBED_VERSION\"/" package.json && rm package.json.bak
2224

23-
# commit vanilla bump in react lib
24-
echo "-- commit vanilla lib bump in react lib"
25+
# commit embed bump in embed-react
26+
echo "-- commit embed bump in embed-react"
2527
cd $REPO_ROOT
2628
git add packages/embed-react
2729
git commit -m 'feat: Bump @typeform/embed in @typeform/embed-react package [skip ci]'
2830
git push https://$GITHUB_TOKEN@github.com/Typeform/embed.git
2931

30-
# release react lib, will also commit all changes in react lib including vanilla lib bump
31-
echo "-- release react lib, will also commit all changes in react lib including vanilla lib bump"
32+
# release embed-react, will also commit all changes in embed-react including embed bump
33+
echo "-- release embed-react lib, will also commit all changes in embed-react including embed bump"
3234
cd $REPO_ROOT/packages/embed-react
3335
yarn release
3436

35-
# bump vanilla and react libs in demos
36-
echo "-- bump vanilla and react libs in demos"
37+
# bump embed and embed-react in demos
38+
echo "-- bump embed and embed-react in demos"
39+
EMBED_VERSION=$(npm view @typeform/embed version)
40+
EMBED_REACT_VERSION=$(npm view @typeform/embed-react version)
41+
echo "Latest @typeform/embed version: $EMBED_VERSION"
42+
echo "Latest @typeform/embed-react version: $EMBED_REACT_VERSION"
3743
cd $REPO_ROOT/packages/demo-nextjs
38-
yarn upgrade @typeform/embed
39-
yarn upgrade @typeform/embed-react
44+
sed -i.bak "s/\"@typeform\/embed\": \".*\"/\"@typeform\/embed\": \"$EMBED_VERSION\"/" package.json && rm package.json.bak
45+
sed -i.bak "s/\"@typeform\/embed-react\": \".*\"/\"@typeform\/embed-react\": \"$EMBED_REACT_VERSION\"/" package.json && rm package.json.bak
4046

41-
cd $REPO_ROOT/packages/demo-react
42-
yarn upgrade @typeform/embed-react
43-
44-
cd $REPO_ROOT/packages/demo-webpack
45-
yarn upgrade @typeform/embed
46-
47-
# commit vanilla and react lib bumps in demos
48-
echo "-- commit vanilla and react lib bumps in demos"
47+
# commit embed and embed-react bumps in demo-nextjs
48+
echo "-- commit embed and embed-react bumps in demp-nextjs"
4949
cd $REPO_ROOT
50-
git add packages/demo-*
51-
git commit -m 'chore: Bump @typeform/embed and @typeform/embed-react in demo packages'
50+
git add packages/demo-nextjs
51+
git commit -m 'chore: Bump @typeform/embed and @typeform/embed-react in demo-nextjs'
5252
git push https://$GITHUB_TOKEN@github.com/Typeform/embed.git

0 commit comments

Comments
 (0)