-
Notifications
You must be signed in to change notification settings - Fork 15
Library folder sync #83
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
Open
AkazaRenn
wants to merge
21
commits into
GedasFX:main
Choose a base branch
from
AkazaRenn:lib-sync
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
a7cb289
Enable sync libraries in the backend
AkazaRenn 80273c2
Update settings format
AkazaRenn 5486fca
Remove unrelated change
AkazaRenn f7abd39
Dummy UI, can get config from backend
AkazaRenn 40df626
fix getting config dict
AkazaRenn ce859bc
Link UI toggles/inputs with backend
AkazaRenn d70d23a
Add margin-top on path page to skip the top bar space
AkazaRenn 988eff5
Simplify LibrarySyncState init code
AkazaRenn a83890a
Migrate to json config
AkazaRenn d5cc0f0
Move whole settings to the json
AkazaRenn 0656227
Minor formatting
AkazaRenn 68aba6c
Change destination input to a dialog
AkazaRenn 82938f7
Allow left/right navigation on lib sync entries
AkazaRenn fe7de22
Merge remote-tracking branch 'origin/lib-sync'
AkazaRenn fc62b08
Add github action
AkazaRenn 6ae2999
Fix rclone launcher path
AkazaRenn 841fad1
Fix rclone launcher path
AkazaRenn ecdaee7
Restore missing change
AkazaRenn fdc8125
Update build.yml to publish releases
AkazaRenn a8d6085
Fix sync state tracking
AkazaRenn 4af041a
Merge remote-tracking branch 'upstream/main' into lib-sync
AkazaRenn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,82 @@ | ||
| name: Build Plugin | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| pull_request_target: | ||
| branches: ['*'] | ||
|
|
||
| jobs: | ||
| build: | ||
| name: Build plugin | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Create variables | ||
| run: echo "TIMESTAMP=$(date +'%Y%m%d%H%M%S')" >> $GITHUB_ENV | ||
|
|
||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| ref: ${{ github.event.pull_request.head.sha || github.sha }} | ||
| fetch-depth: 0 | ||
| submodules: "recursive" | ||
| token: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Append hash to plugin version | ||
| run: | | ||
| echo "::notice::This run was triggered by a commit. Appending the commit hash to the plugin version." | ||
|
|
||
| PACKAGE_FILE="package.json" | ||
|
|
||
| SHA=$(cut -c1-7 <<< "${{ github.event.pull_request.head.sha || github.sha }}") | ||
| VERSION=$(jq -r '.version' $PACKAGE_FILE) | ||
| NEW_VERSION="$VERSION-$SHA" | ||
|
|
||
| echo "::notice::Going from $VERSION to $NEW_VERSION" | ||
|
|
||
| tmp=$(mktemp) | ||
| jq --arg newversion "$NEW_VERSION" '.version = $newversion' $PACKAGE_FILE > $tmp | ||
| mv $tmp $PACKAGE_FILE | ||
|
|
||
| echo "::endgroup::" | ||
|
|
||
| - uses: pnpm/action-setup@v3 | ||
|
|
||
| - name: Update pnpm lockfile | ||
| run: | | ||
| $(which pnpm) install --lockfile-only | ||
|
|
||
| - name: Download Decky CLI | ||
| run: | | ||
| mkdir -p "$(pwd)"/cli | ||
| curl -L -o "$(pwd)"/cli/decky "https://github.com/SteamDeckHomebrew/cli/releases/latest/download/decky-linux-x86_64" | ||
| chmod +x "$(pwd)"/cli/decky | ||
|
|
||
| - name: Build plugin | ||
| run: | | ||
| # Run the CLI as root to get around Docker's weird permissions | ||
| sudo .vscode/build.sh | ||
| sudo chown -R $(whoami) out | ||
|
|
||
| - name: Unzip plugin | ||
| run: | | ||
| for file in out/*.zip; do | ||
| echo "Unzipping $file" | ||
| unzip -qq "$file" -d out | ||
| done | ||
| tree out | ||
|
|
||
| - name: Upload Artifacts | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: output | ||
| path: out/*/ | ||
|
|
||
| - name: Release | ||
| uses: softprops/action-gh-release@v2 | ||
| with: | ||
| tag_name: ${{ env.TIMESTAMP }} | ||
| prerelease: true | ||
| files: out/*.zip | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,8 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| PLUGIN_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) | ||
| CONFIG_DIR="$PLUGIN_DIR/../../../settings/decky-cloud-save" | ||
| BIN_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) | ||
| PLUGIN_DIR=$(realpath "$BIN_DIR"/..) | ||
| CONFIG_DIR=$(realpath "$PLUGIN_DIR"/../../settings/"$(basename "$PLUGIN_DIR")") | ||
|
|
||
| exec "$PLUGIN_DIR/rclone" "--config" "$CONFIG_DIR/rclone.conf" "$@" | ||
| exec "$BIN_DIR/rclone" "--config" "$CONFIG_DIR/rclone.conf" "$@" | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure why but my own build uses |
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This action builds and creates a prerelease with the tag using a timestamp like 20240824153302 (when the action runs), it would be triggered on every push on the main branch.
You can check my fork as an example https://github.com/AkazaRenn/decky-cloud-save/tags