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

Alpha Version #2

Merged
merged 27 commits into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
e03a8cc
Added blank project
pingu2k4 May 9, 2024
552641f
Basic commands setup
pingu2k4 May 9, 2024
bf2ef6d
First instance of using the SDK seems to work
pingu2k4 May 9, 2024
7f5ef24
Might have already finished sync?
pingu2k4 May 9, 2024
1b1c3e5
removed single quote around count
pingu2k4 May 9, 2024
32518bf
Full serialisation, and tests of deserialisation working
pingu2k4 May 9, 2024
4e2d667
Added conversion to concrete types for Attribute
pingu2k4 May 9, 2024
b79d607
Created ability to properly compare and read attributes
pingu2k4 May 9, 2024
3db0700
Ignoring serialization of converted attributes
pingu2k4 May 9, 2024
e48b2f9
LIttle cleanup
pingu2k4 May 9, 2024
8c9b723
Added launch profile for migrate
pingu2k4 May 9, 2024
2d3ea7a
Completely updated DB and metadata on migrate
pingu2k4 May 10, 2024
9749382
Collections plus metadata working
pingu2k4 May 10, 2024
a564d85
Updating and deleting attributes mainly there
pingu2k4 May 10, 2024
dc139b8
Fixed mismatch when comparing DateAttributes
pingu2k4 May 11, 2024
fdee9a2
Fixed enum attribute not comparing correctly
pingu2k4 May 11, 2024
61e57d0
Rebult old schema prior to indexes
pingu2k4 May 11, 2024
f5fb881
Improved messaging
pingu2k4 May 11, 2024
4463a6d
First fleshed out version...
pingu2k4 May 11, 2024
912aafc
Removed unneeded comment
pingu2k4 May 12, 2024
14ccc5f
Updated csproj so that we can publish a nuget
pingu2k4 May 13, 2024
1f9fa03
Added renovate
pingu2k4 May 13, 2024
25db961
Marked version as alpha as it is pre-release
pingu2k4 May 13, 2024
366510d
Rewritten package name to add pinguapps branding
pingu2k4 May 13, 2024
9de398b
Added .github contents
pingu2k4 May 13, 2024
8b4afe8
Added more metadata for nuget package
pingu2k4 May 13, 2024
b275508
Updated actions
pingu2k4 May 14, 2024
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
32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Bug report
description: Create a report to help us improve
title: '[Bug] '
labels: bug
body:
- type: textarea
attributes:
label: "Describe the bug"
description: "A clear and concise description of what the bug is."
validations:
required: true
- type: textarea
attributes:
label: "Reproduction Steps"
description: "Steps to reproduce the bug"
value: |
1.
2.
3.
...
- type: textarea
attributes:
label: "Expected Behaviour"
description: "A clear and concise description of what you expected to happen."
- type: textarea
attributes:
label: "Screenshots / Examples"
description: "Add screenshots or examples with minimal repro's is applicable"
- type: textarea
attributes:
label: "Additional Context"
description: "Add any other context about the problem"
15 changes: 15 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Feature request
description: Suggest an idea for this project
title: "[FEAT] "
labels: enhancement
body:
- type: textarea
attributes:
label: "Describe the feature"
description: "A clear and concise description of what the feature is"
validations:
required: true
- type: textarea
attributes:
label: "Additional Context"
description: "Any additional context as to why you are suggesting this feature"
15 changes: 15 additions & 0 deletions .github/ISSUE_TEMPLATE/question.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Question
description: Ask a question about this library
title: '[Question] '
labels: question
body:
- type: textarea
attributes:
label: "Question"
description: "**Please be sure to check the readme file before raising an issue.**"
validations:
required: true
- type: textarea
attributes:
label: "Additional Context"
description: "Add any other context about the problem"
33 changes: 33 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name-template: "v$RESOLVED_VERSION"
tag-template: "v$RESOLVED_VERSION"
change-template: "- [#$NUMBER] $TITLE - Thanks to @$AUTHOR!"
exclude-labels:
- automated
categories:
- title: "🚀 Features"
labels:
- "feature"
- "enhancement"
- title: "🐛 Bug Fixes"
labels:
- "bug"
- "fix"
- title: "📄 Documentation"
labels:
- "docs"
- "documentation"
version-resolver:
major:
labels:
- 'major'
minor:
labels:
- 'minor'
patch:
labels:
- 'patch'
default: patch
template: |
## Changes

$CHANGES
34 changes: 34 additions & 0 deletions .github/workflows/_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Build

on:
workflow_call:

env:
DOTNET_VERSION: '8.0'

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4

- name: Setup .NET
uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 # v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}

- name: Nuget Cache
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
restore-keys: |
${{ runner.os }}-nuget-

- name: Restore
run: dotnet restore

- name: Build
run: dotnet build -c Release --no-restore
55 changes: 55 additions & 0 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Dev

on:
push:
branches: [ dev ]
release:
types: [ published ]
workflow_dispatch:

jobs:
build:
name: Build & Test
uses: ./.github/workflows/_build.yml
secrets: inherit

release:
name: Push to main
runs-on: ubuntu-latest
needs: build
if: github.event_name == 'release'
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
with:
ref: dev

- name: Get Release Version
id: grv
run: |
arrTag=(${GITHUB_REF//\// })
VERSION="${arrTag[2]}"
echo Version: $VERSION
VERSION="${VERSION:1}"
echo Clean Version: $VERSION
echo "version=$VERSION" >> ${GITHUB_OUTPUT}

- name: Create Pull Request
id: cpr
env:
GH_TOKEN: ${{ secrets.PAT }}
run: |
git fetch origin main
pr_number=$(gh pr create --base main --head dev --assignee pingu2k4 --fill --label automated --label release --title "Merge v${{ steps.grv.outputs.version }}" | grep -o 'https://github.com/[^/]\+/[^/]\+/pull/\([0-9]\+\)' | awk -F '/' '{print $NF}')
echo PR Number: $pr_number
echo "prNumber=$pr_number" >> ${GITHUB_OUTPUT}

- name: Merge Pull Request
if: ${{ steps.cpr.outputs.prNumber }}
env:
GH_TOKEN: ${{ secrets.PAT }}
run: |
gh pr merge ${{ steps.cpr.outputs.prNumber }} --auto --merge
79 changes: 79 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Main

on:
push:
branches: [ main ]
workflow_dispatch:

env:
PROJECT_NAME: PinguApps.AppwriteMigrator
DOTNET_VERSION: '8.0'
NUGET_FEED: https://api.nuget.org/v3/index.json
NUGET_KEY: ${{ secrets.NUGET_KEY }}

jobs:
build:
name: Build & Test
uses: ./.github/workflows/_build.yml
secrets: inherit

push-nuget:
needs: build
name: Push Nuget
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4

- name: Setup .NET
uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 # v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}

- name: Get Release version
id: grv
run: |
arrTag=(${GITHUB_REF//\// })
VERSION="${arrTag[2]}"
echo Version: $VERSION
VERSION="${VERSION:1}"
echo Clean Version: $VERSION
echo version=$VERSION >> ${GITHUB_OUTPUT}

- name: Create Nuget Package
run: |
dotnet pack -c Release --verbosity normal --include-symbols --include-source -p:PackageVersion=${{ steps.grv.outputs.version }} -o nupkg src/$PROJECT_NAME/$PROJECT_NAME.csproj

- name: Push to NuGet Feed
run: dotnet nuget push ./nupkg/*.nupkg --source $NUGET_FEED --api-key $NUGET_KEY --skip-duplicate

sync:
name: Sync back to dev
runs-on: ubuntu-latest
needs: build
if: github.event_name == 'push'
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
with:
ref: main

- name: Create Pull Request
id: cpr
env:
GH_TOKEN: ${{ secrets.PAT }}
run: |
git fetch origin dev
pr_number=$(gh pr create --base dev --head main --assignee pingu2k4 --fill --label automated --label sync | grep -o 'https://github.com/[^/]\+/[^/]\+/pull/\([0-9]\+\)' | awk -F '/' '{print $NF}')
echo PR Number: $pr_number
echo "prNumber=$pr_number" >> ${GITHUB_OUTPUT}

- name: Merge Pull Request
if: ${{ steps.cpr.outputs.prNumber }}
env:
GH_TOKEN: ${{ secrets.PAT }}
run: |
gh pr merge ${{ steps.cpr.outputs.prNumber }} --auto --merge
13 changes: 13 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: PR

on:
pull_request:
branches:
- dev
- main

jobs:
build:
name: Build & Test
uses: ./.github/workflows/_build.yml
secrets: inherit
17 changes: 17 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Release Drafter

on:
push:
branches: [ dev ]

permissions:
contents: write
pull-requests: write

jobs:
update_release_draft:
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@3f0f87098bd6b5c5b9a36d49c41d998ea58f9348 # v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30 changes: 30 additions & 0 deletions AppwriteMigrator.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.9.34616.47
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{71D166D2-2A31-4DA2-812E-A3CD57642818}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PinguApps.AppwriteMigrator", "src\PinguApps.AppwriteMigrator\PinguApps.AppwriteMigrator.csproj", "{DE7C008B-396A-47AF-941D-091281D3AF9C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{DE7C008B-396A-47AF-941D-091281D3AF9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DE7C008B-396A-47AF-941D-091281D3AF9C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DE7C008B-396A-47AF-941D-091281D3AF9C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DE7C008B-396A-47AF-941D-091281D3AF9C}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{DE7C008B-396A-47AF-941D-091281D3AF9C} = {71D166D2-2A31-4DA2-812E-A3CD57642818}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {692F7A47-CDB5-41E2-8883-E642F6A53D7B}
EndGlobalSection
EndGlobal
6 changes: 6 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"github>pinguapps/renovate-config"
]
}
Loading