Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove base directory for gradle.properties file #2585

Merged
merged 2 commits into from Dec 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 8 additions & 6 deletions .github/scripts/publish-latest-release.sh
Expand Up @@ -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
10 changes: 5 additions & 5 deletions .github/scripts/set-env.sh
Expand Up @@ -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
Expand Down