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

Docs/update documentation #51

Merged
merged 67 commits into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
87bcbb1
Update documentation
estivensh Nov 22, 2023
2e7adc4
Update documentation.yml
estivensh Nov 22, 2023
6359b10
Update code-coverage.yml
estivensh Nov 22, 2023
40459e8
Update documentation
estivensh Nov 22, 2023
a788e19
Update documentation
estivensh Nov 22, 2023
5028adc
Update documentation
estivensh Nov 22, 2023
bb4fa40
Update documentation
estivensh Nov 22, 2023
109b3bb
Update documentation
estivensh Nov 22, 2023
2cf993d
Update documentation
estivensh Nov 22, 2023
28d4645
Update build.yml
estivensh Nov 22, 2023
d73ede1
Update build.yml
estivensh Nov 22, 2023
3e43404
Update build.yml
estivensh Nov 22, 2023
ef52dc9
Update build.yml
estivensh Nov 22, 2023
e3a3bac
Update build.yml
estivensh Nov 22, 2023
6eb46c2
Update build.yml
estivensh Nov 22, 2023
1664e68
Update build.yml
estivensh Nov 22, 2023
73495e4
Update build.yml
estivensh Nov 22, 2023
3ad8a21
Update build.yml
estivensh Nov 22, 2023
670bf97
Update build.yml
estivensh Nov 22, 2023
a1f1f85
Update build.yml
estivensh Nov 22, 2023
19de7e7
Update build.yml
estivensh Nov 22, 2023
f96ab4f
Update build.yml
estivensh Nov 22, 2023
0c6056d
Update build.yml
estivensh Nov 22, 2023
c538235
Update build.yml
estivensh Nov 22, 2023
adbf6d5
Update build.yml
estivensh Nov 22, 2023
552dd37
Update build.yml
estivensh Nov 22, 2023
00e66c2
Update build.yml
estivensh Nov 22, 2023
a29e140
Update build.yml
estivensh Nov 22, 2023
3787a6a
Update build.yml
estivensh Nov 22, 2023
65062cb
Update build.yml
estivensh Nov 22, 2023
55920a0
Update build.yml
estivensh Nov 22, 2023
ab87cb8
Update build.yml
estivensh Nov 22, 2023
5506aef
Update build.yml
estivensh Nov 22, 2023
6a2cf77
Update build.yml
estivensh Nov 22, 2023
5875eeb
Update build.yml
estivensh Nov 22, 2023
a92533d
Update build.yml
estivensh Nov 22, 2023
724e1fc
Update build.yml
estivensh Nov 22, 2023
c50daae
Update build.yml
estivensh Nov 22, 2023
4d77a39
Update build.yml
estivensh Nov 22, 2023
316381b
Update build.yml
estivensh Nov 22, 2023
2cc3a97
Update build.yml
estivensh Nov 22, 2023
94c2136
Update build.yml
estivensh Nov 22, 2023
4a157cf
Update build.yml
estivensh Nov 22, 2023
80c93fa
Update build.yml
estivensh Nov 22, 2023
bac5779
Update build.yml
estivensh Nov 22, 2023
e38fbdb
Update build.yml
estivensh Nov 22, 2023
b0d364a
Update build.yml
estivensh Nov 22, 2023
4b533fb
Update build.yml
estivensh Nov 22, 2023
2f2f615
Update build.yml
estivensh Nov 22, 2023
898c75d
Update build.yml
estivensh Nov 22, 2023
165c5fb
Update build.yml
estivensh Nov 22, 2023
af0a450
Update build.yml
estivensh Nov 22, 2023
d8d83ac
Update build.yml
estivensh Nov 22, 2023
db34eff
Update build.yml
estivensh Nov 22, 2023
f070303
Update build.yml
estivensh Nov 22, 2023
cc67d16
Update build.yml
estivensh Nov 22, 2023
c849a16
Update build.yml
estivensh Nov 22, 2023
5397318
Update build.yml
estivensh Nov 22, 2023
bdfd905
Update build.yml
estivensh Nov 22, 2023
006eb39
Update build.yml
estivensh Nov 22, 2023
1361b2c
Update workflows
estivensh Nov 22, 2023
d36eda6
Update workflows
estivensh Nov 22, 2023
4cc18b1
Update workflows
estivensh Nov 22, 2023
bb08c62
Update workflows
estivensh Nov 22, 2023
3cad320
Update workflows
estivensh Nov 22, 2023
c48ce8a
Update publish.yml
estivensh Nov 22, 2023
55c7b36
Update workflows
estivensh Nov 22, 2023
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
10 changes: 10 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,16 @@ jobs:
key: ${{ runner.os }}-konan-${{ hashFiles('**/*.gradle*', 'gradle/**/*') }}
restore-keys: |
${{ runner.os }}-konan-
- name: Replace keys
run: |
AWS_ACCESS_KEY=${{ secrets.AWS_ACCESS_KEY }}
AWS_SECRET_KEY=${{ secrets.AWS_SECRET_KEY }}
AWS_ACCESS_KEY_SCAPE=$(echo "$AWS_ACCESS_KEY" | sed 's/[\&/]/\\&/g')
AWS_SECRET_KEY_SCAPE=$(echo "$AWS_SECRET_KEY" | sed 's/[\&/]/\\&/g')

sed -i -e "s/private val accessKey = .*/private val accessKey = \"$AWS_ACCESS_KEY_SCAPE\"/" -e "s/private val secretKey = .*/private val secretKey = \"$AWS_SECRET_KEY_SCAPE\"/" aws-s3/src/commonTest/kotlin/com/estivensh4/s3/AWSS3CommonTest.kt
cat aws-s3/src/commonTest/kotlin/com/estivensh4/s3/AWSS3CommonTest.kt
working-directory: ${{ github.workspace }}/
- name: Check
run: ./local-check.sh
- name: Library local publish
Expand Down
14 changes: 13 additions & 1 deletion .github/workflows/code-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@ on:

env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
AWS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }}
AWS_SECRET_KEY: ${{ secrets.AWS_SECRET_KEY }}

permissions:
contents: write

jobs:
build:
if: github.ref == 'refs/heads/main'
name: Build and analyze
runs-on: self-hosted
steps:
Expand All @@ -43,6 +44,17 @@ jobs:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Replace keys
run: |
AWS_ACCESS_KEY=${{ secrets.AWS_ACCESS_KEY }}
AWS_SECRET_KEY=${{ secrets.AWS_SECRET_KEY }}
AWS_ACCESS_KEY_SCAPE=$(echo "$AWS_ACCESS_KEY" | sed 's/[\&/]/\\&/g')
AWS_SECRET_KEY_SCAPE=$(echo "$AWS_SECRET_KEY" | sed 's/[\&/]/\\&/g')

sed -i '' "s|private val accessKey = .*|private val accessKey = \"$AWS_ACCESS_KEY\"|g" aws-s3/src/commonTest/kotlin/com/estivensh4/s3/AWSS3CommonTest.kt
sed -i '' "s|private val secretKey = .*|private val secretKey = \"$AWS_SECRET_KEY\"|g" aws-s3/src/commonTest/kotlin/com/estivensh4/s3/AWSS3CommonTest.kt
cat aws-s3/src/commonTest/kotlin/com/estivensh4/s3/AWSS3CommonTest.kt
working-directory: ${{ github.workspace }}/
- name: Kover verify
run: ./gradlew koverVerify
- name: Build and analyze
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
name: Create release and documentation
name: Publish documentation

on:
pull_request:
branches:
- main
- docs/*
push:
branches:
- main
- docs/*

permissions: write-all

Expand Down
14 changes: 12 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Create release and documentation
name: Create release

on:
workflow_dispatch:
Expand Down Expand Up @@ -37,6 +37,16 @@ jobs:
java-version: '17'
distribution: 'zulu'
cache: gradle
- name: Replace keys
run: |
AWS_ACCESS_KEY=${{ secrets.AWS_ACCESS_KEY }}
AWS_SECRET_KEY=${{ secrets.AWS_SECRET_KEY }}
AWS_ACCESS_KEY_SCAPE=$(echo "$AWS_ACCESS_KEY" | sed 's/[\&/]/\\&/g')
AWS_SECRET_KEY_SCAPE=$(echo "$AWS_SECRET_KEY" | sed 's/[\&/]/\\&/g')

sed -i -e "s/private val accessKey = .*/private val accessKey = \"$AWS_ACCESS_KEY_SCAPE\"/" -e "s/private val secretKey = .*/private val secretKey = \"$AWS_SECRET_KEY_SCAPE\"/" aws-s3/src/commonTest/kotlin/com/estivensh4/s3/AWSS3CommonTest.kt
cat aws-s3/src/commonTest/kotlin/com/estivensh4/s3/AWSS3CommonTest.kt
working-directory: ${{ github.workspace }}/
- name: Prebuild library
run: ./gradlew publishToMavenLocal
- name: Publish library
Expand All @@ -57,4 +67,4 @@ jobs:
release_name: v${{ github.event.inputs.version }}
body: "Will be filled later"
draft: false
prerelease: ${{ github.event.inputs.prerelease }}
prerelease: ${{ github.event.inputs.prerelease }}
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,11 @@ class AWSS3CommonTest {
private lateinit var client: AWSS3
private val bucketName = "bucket-unit-testing"
private val key = "pexels-pixabay-415829.jpg"
private val accessKey = "accessKey"
private val secretKey = "secretKey"

@BeforeTest
fun setUp() {

val accessKey = "AKIA2D36JC4724G565BB"
val secretKey = "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"
client = AWSS3.builder()
.accessKey(accessKey)
.secretKey(secretKey)
Expand Down
45 changes: 0 additions & 45 deletions doc/Writerside/topics/S3.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,51 +45,6 @@ target 'iosApp' do
end
</code-block>
</li>
<li>create your AppDelegate.swift
<code-block lang="swift">
import Foundation
import UIKit
import AWSS3
import shared

class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
initializeS3()
return true
}

}

func initializeS3() {
let credentialsProvider = AWSStaticCredentialsProvider(accessKey: "YOUR_ACCESS_KEY", secretKey: "YOUR_SECRET_KEY")
let configuration = AWSServiceConfiguration.init(region: .USEast1, credentialsProvider: credentialsProvider)

AWSServiceManager.default().defaultServiceConfiguration = configuration

}
</code-block>
</li>
<li>and in your iOSApp.swift file
<code-block lang="swift">
import SwiftUI

@main
struct iOSApp: App {

@UIApplicationDelegateAdaptor(AppDelegate.self) var delegate

var body: some Scene {
WindowGroup {
ContentView()
}
}

}
</code-block>
</li>
</list>

## Examples
Expand Down
2 changes: 1 addition & 1 deletion doc/Writerside/writerside.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
<images dir="images" web-path="aws-kmp"/>
<categories src="c.list"/>
<vars src="v.list"/>
<instance src="akm.tree" keymaps-mode="provided" version="v0.5.5"/>
<instance src="akm.tree" keymaps-mode="provided" version="v0.5.6"/>
</ihp>
5 changes: 5 additions & 0 deletions replace.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

# Reemplazar la constante OLD_VALUE con el valor proporcionado en la variable de entorno NEW_VALUE
sed -i '' "s|private val accessKey = .*|private val accessKey = \"$AWS_ACCESS_KEY\"|g" aws-s3/src/commonTest/kotlin/com/estivensh4/s3/AWSS3CommonTest.kt
sed -i '' "s|private val secretKey = .*|private val secretKey = \"$AWS_SECRET_KEY\"|g" aws-s3/src/commonTest/kotlin/com/estivensh4/s3/AWSS3CommonTest.kt
Loading