Skip to content

Commit

Permalink
docs: break build on bad sdk version (#4791)
Browse files Browse the repository at this point in the history
Co-authored-by: Matthew Elwell <[email protected]>
  • Loading branch information
rolodato and matthewelwell authored Nov 1, 2024
1 parent d5cc2c2 commit 973bdf9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/docs/clients/client-side/android.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ repositories {

In your project path `app/build.gradle` add a new dependency:

<CodeBlock>{`implementation("com.flagsmith:flagsmith-kotlin-android-client:v`}<AndroidVersion />"{`)`}</CodeBlock>
<CodeBlock>{`implementation("com.flagsmith:flagsmith-kotlin-android-client:`}<AndroidVersion />"{`)`}</CodeBlock>

## Basic Usage

Expand Down
9 changes: 4 additions & 5 deletions docs/plugins/flagsmith-versions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,10 @@ const fetchJavaVersions = async () =>
artifactId: 'flagsmith-java-client',
});

const fetchAndroidVersions = async () =>
fetchMavenVersions({
groupId: 'com.flagsmith',
artifactId: 'flagsmith-kotlin-android-client',
});
const fetchAndroidVersions = async () => {
const data = await fetchJSON('https://api.github.com/repos/flagsmith/flagsmith-kotlin-android-client/releases');
return data.map((release) => (release.tag_name.startsWith('v') ? release.tag_name.slice(1) : release.tag_name));
};

const fetchIOSVersions = async () => {
// retrieved from https://cocoapods.org/pods/FlagsmithClient
Expand Down
4 changes: 3 additions & 1 deletion docs/src/components/SdkVersions.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ import { maxSatisfying } from 'semver';

const Version = ({ sdk, spec = '*', options = {} }) => {
const {
siteConfig: { CI },
siteConfig: {
customFields: { CI },
},
} = useDocusaurusContext();
const versions = usePluginData('flagsmith-versions')[sdk];
if (!versions) throw new Error('unknown sdk: ' + sdk);
Expand Down

0 comments on commit 973bdf9

Please sign in to comment.