@@ -11,7 +11,8 @@ function main {
1111 # created from git tags, skipping the versions that started with 0.
1212 section " List of versions to build:"
1313 cd $tmp_flame_src
14- list=$( git tag | grep ' ^[1-9][^-]*$' | sort -rV)
14+ # Removes all the old versions that doesn't support Melos 7 and pub workspaces.
15+ list=$( git for-each-ref --sort=creatordate --format ' %(refname:short)' ' refs/tags/v*' | sed -n ' 29,$p' | sort -rV)
1516 cd -
1617 echo " $list "
1718 latest_version=$( head -n 1 <<< " $list" )
@@ -44,7 +45,6 @@ function prepare_flame_repo {
4445 git clone https://github.com/flame-engine/flame.git $tmp_flame_src
4546 mkdir $tmp_stash
4647 cp -r $tmp_flame_src /doc/_sphinx $tmp_stash
47- cp $tmp_flame_src /melos.yaml $tmp_stash
4848 cp -r $tmp_flame_src /scripts $tmp_stash
4949 cp $tmp_flame_src /pubspec.yaml $tmp_stash
5050}
@@ -67,29 +67,13 @@ function generate_docs_for_version {
6767 cd -
6868 rm -rf $tmp_flame_src /doc/_sphinx
6969 cp -r $tmp_stash /_sphinx $tmp_flame_src /doc/
70- cp -r $tmp_stash /melos.yaml $tmp_flame_src /
71- # Since the scripts used in melos.yaml are the scripts from main we have to
70+ # Since the scripts used in pubspec.yaml are the scripts from main we have to
7271 # replace the script directory with the newest one.
7372 rm -rf $tmp_flame_src /scripts
7473 cp -r $tmp_stash /scripts $tmp_flame_src
75- # This is a very fragile work around for the fact that older versions don't
76- # have a pubspec.yaml in the root which is required by Melos 3.
77- cp -r $tmp_stash /pubspec.yaml $tmp_flame_src /
7874
7975 cd $tmp_flame_src
8076
81- # This is due to both these examples having the name "example" in v1.0.0
82- sed -i " s/name: example/name: flame_audio_example/g" packages/flame_audio/example/pubspec.yaml
83- sed -i " s/name: example/name: flame_bloc_example/g" packages/flame_bloc/example/pubspec.yaml
84- sed -i " s/name: example/name: flame_fire_atlas_example/g" packages/flame_fire_atlas/example/pubspec.yaml
85- sed -i " s/name: example/name: flame_flare_example/g" packages/flame_flare/example/pubspec.yaml || true
86- sed -i " s/name: example/name: flame_forge2d_example/g" packages/flame_forge2d/example/pubspec.yaml
87- sed -i " s/name: example/name: flame_oxygen_example/g" packages/flame_oxygen/example/pubspec.yaml
88- sed -i " s/name: example/name: flame_rive_example/g" packages/flame_rive/example/pubspec.yaml
89- sed -i " s/name: example/name: flame_svg_example/g" packages/flame_svg/example/pubspec.yaml
90- sed -i " s/name: example/name: flame_test_example/g" packages/flame_test/example/pubspec.yaml
91- sed -i " s/name: example/name: flame_tiled_example/g" packages/flame_tiled/example/pubspec.yaml
92-
9377 melos bootstrap || echo " Melos bootstrapping failed, trying without"
9478 melos run doc-setup
9579 cd -
0 commit comments