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

CF-99: Separate docs per version #504

Merged
merged 8 commits into from
Mar 9, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
added index.html file to redirect to the latest version
  • Loading branch information
aboedo committed Mar 9, 2022
commit a448e41441cdec8865f0572743c0355038ab7443
5 changes: 4 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,10 @@ jobs:
command: sudo pip install awscli
- run:
name: Deploy to S3
command: aws s3 sync ~/purchases-android/docs s3://purchases-docs/android --delete
command: aws s3 sync ~/purchases-android/docs/5.1.0-SNAPSHOT s3://purchases-docs/android/5.1.0-SNAPSHOT --delete
- run:
name: Update index.html
command: aws s3 cp ~/purchases-android/docs/index.html s3://purchases-docs/android/index.html
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can move these two to fastlane one day. Not now

- run:
name: Invalidate CloudFront caches
command: aws cloudfront create-invalidation --distribution-id EPTW7F3CB566V --paths "/*"
Expand Down
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,8 @@ fastlane/report.xml
integration-tests/keystore

# share settings
!/.idea/codeStyles/
!/.idea/codeStyles/

# index.html is used to redirect to the latest docs version
# when navigating to root
!/docs/index.html
8 changes: 8 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="refresh" content="0; url=https://docs.revenuecat.com/android/5.1.0-SNAPSHOT/index.html" />
</head>
<body>
</body>
</html>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had forgotten about this file 😄

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a new file tho 😂 I just created it today so it would redirect automatically

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh. I had uploaded one to AWS so it would redirect to the https://sdk.revenuecat.com/android/docs/index.html if accessing https://sdk.revenuecat.com/android/index.html. But I think that's long time gone 😄

2 changes: 2 additions & 0 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ platform :android do
previous_version = android_get_version_name(gradle_file: gradle_file_path)
android_set_version_name(version_name: new_version, gradle_file: gradle_file_path)
increment_version_in(previous_version, new_version, '../common/src/main/java/com/revenuecat/purchases/common/Config.kt')
increment_version_in(previous_version, new_version, '../.circleci/config.yml')
increment_version_in(previous_version, new_version, '../docs/index.html')
increment_version_in(previous_version, new_version, '../gradle.properties')
end

Expand Down