diff --git a/.github/scripts/publish-latest-release.sh b/.github/scripts/publish-latest-release.sh index ef7fd8a0e0d..dd105f5c3af 100755 --- a/.github/scripts/publish-latest-release.sh +++ b/.github/scripts/publish-latest-release.sh @@ -7,11 +7,13 @@ set -e cd _site/ for file in *; do - if [ -f "$file" ]; then - echo "Copying $file ..." - aws s3 cp $file s3://$S3_BUCKET/docs/$file >> $BASEDIR/logs/aws_sync.log - continue + if [ "$file" != "index.html" ]; then + if [ -f "$file" ]; then + echo "Copying $file ..." + aws s3 cp $file s3://$S3_BUCKET/docs/$file >> $BASEDIR/logs/aws_sync.log + continue + fi + echo "Sync $file ..." + aws s3 sync $file s3://$S3_BUCKET/docs/$file --delete >> $BASEDIR/logs/aws_sync.log fi - echo "Sync $file ..." - aws s3 sync $file s3://$S3_BUCKET/docs/$file --delete >> $BASEDIR/logs/aws_sync.log done diff --git a/.github/scripts/set-env.sh b/.github/scripts/set-env.sh index c5945b4050e..3ddbe6790b5 100755 --- a/.github/scripts/set-env.sh +++ b/.github/scripts/set-env.sh @@ -15,22 +15,22 @@ if [ "$GITHUB_REF" == "refs/heads/main" ]; then fi if [ "$LATEST_PUBLISHED_VERSION" == "" ]; then exit 1; fi - RELEASE_VERSION=$(grep "projects.latestVersion" $BASEDIR/gradle.properties | cut -d= -f2) + RELEASE_VERSION=$(grep "projects.latestVersion" gradle.properties | cut -d= -f2) if [ "$LATEST_PUBLISHED_VERSION" != "$RELEASE_VERSION" ]; then NEW_RELEASE_VERSION_EXISTS=1; fi else echo "Into release branch ..." BRANCH_VERSION=$(echo $GITHUB_REF | cut -d/ -f4) - RELEASE_VERSION=$(grep "projects.latestVersion" $BASEDIR/gradle.properties | cut -d= -f2) + RELEASE_VERSION=$(grep "projects.latestVersion" gradle.properties | cut -d= -f2) if [ "$BRANCH_VERSION" == "$RELEASE_VERSION" ]; then NEW_RELEASE_VERSION_EXISTS=1 else - perl -pe "s/^projects.version=.*/projects.version=$BRANCH_VERSION-SNAPSHOT/g" -i $BASEDIR/gradle.properties + perl -pe "s/^projects.version=.*/projects.version=$BRANCH_VERSION-SNAPSHOT/g" -i gradle.properties fi fi if [ $NEW_RELEASE_VERSION_EXISTS == 1 ]; then - perl -pe "s/^projects.version=.*/projects.version=$RELEASE_VERSION/g" -i $BASEDIR/gradle.properties - perl -pe "s/^org.gradle.parallel=.*/org.gradle.parallel=false/g" -i $BASEDIR/gradle.properties + perl -pe "s/^projects.version=.*/projects.version=$RELEASE_VERSION/g" -i gradle.properties + perl -pe "s/^org.gradle.parallel=.*/org.gradle.parallel=false/g" -i gradle.properties fi echo "LATEST_PUBLISHED_VERSION=$LATEST_PUBLISHED_VERSION" >> $GITHUB_ENV