Skip to content

Conversation

infomiho
Copy link
Collaborator

@infomiho infomiho commented Oct 7, 2025

Description

Moves dope.sh to top level so it can be used with other apps, not only opensaas.sh. Prerequisite for #530

Contributor Checklist

Make sure to do the following steps if they are applicable to your PR:

@infomiho infomiho changed the title Move dope.sh to top level Move dope.sh to top level Oct 7, 2025
@infomiho infomiho force-pushed the extract-dope-sh-to-top-level branch 2 times, most recently from 8c03552 to 1159ea4 Compare October 7, 2025 11:54
@cprecioso
Copy link
Member

cprecioso commented Oct 7, 2025

@infomiho #525 done

@infomiho infomiho force-pushed the extract-dope-sh-to-top-level branch from 1159ea4 to 01c159c Compare October 7, 2025 15:16
Copy link
Member

@cprecioso cprecioso left a comment

Choose a reason for hiding this comment

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

Explanations LGTM, left a couple comments. Leaving approved as they are simple.

I haven't downloaded the branch to actually verify the new paths are correct, but I trust you did.

brew install gpatch
brew install diffutils
```
For detailed information about the diff/patch workflow and MacOS setup requirements, see [../tools/README.md](../tools/README.md).
Copy link
Member

Choose a reason for hiding this comment

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

nitpick:

Suggested change
For detailed information about the diff/patch workflow and MacOS setup requirements, see [../tools/README.md](../tools/README.md).
For detailed information about the diff/patch workflow and macOS setup requirements, see [../tools/README.md](../tools/README.md).

brand name is macOS 🤪

tools/README.md Outdated

## dope.sh - Diff Or Patch Executor

The `dope.sh` script allows you to easily create a diff between two projects (base and derived), or to patch those diffs onto the base project to get the derived one. This is useful when a derived project has only small changes on top of the base project and you want to keep it in a directory in the same repo as the main project.
Copy link
Member

Choose a reason for hiding this comment

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

I'd add here a small sentence saying that having opensaas.sh be in sync with the template was the motivation for it.

Copy link
Member

Choose a reason for hiding this comment

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

+1

tools/README.md Outdated

### Workflow

Since derived apps (like opensaas-sh) are just the Open SaaS template with some small tweaks, and we want to keep them up to date as the template changes, we don't version the actual app code in git. Instead, we version the diffs between it and the template in an `app_diff/` directory.
Copy link
Member

Choose a reason for hiding this comment

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

Oh this thing here, I'd lift to the tool intro!

Copy link
Member

Choose a reason for hiding this comment

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

+1

tools/README.md Outdated
./dope.sh ../template app diff
```

### Running on MacOS
Copy link
Member

@cprecioso cprecioso Oct 8, 2025

Choose a reason for hiding this comment

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

IMO (feel free to disregard)

Suggested change
### Running on MacOS
### Requirements
#### macOS

Copy link
Member

@Martinsos Martinsos left a comment

Choose a reason for hiding this comment

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

Looking good to me from waht I saw, left some comments, but I see @cprecioso has grasp on it so I will let him give the approve and I will stay on the comment level and unsubscribe.


TOOLS_DIR=$(dirname "$(realpath "$0")") # Assumes this script is in `tools/`.
cd "${TOOLS_DIR}" && cd ../..
SCRIPT_DIR=$(dirname "$(realpath "$0")") # Assumes this script is in `opensaas-sh/tools/`.
Copy link
Member

Choose a reason for hiding this comment

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

This comment is not in the correct line anymore I think, I would move it to line below, since assumptions is happening there, with the "/../.."?


TOOLS_DIR=$(dirname "$(realpath "$0")") # Assumes this script is in `tools/`.
cd "${TOOLS_DIR}" && cd ../..
SCRIPT_DIR=$(dirname "$(realpath "$0")") # Assumes this script is in `opensaas-sh/tools/`.
Copy link
Member

Choose a reason for hiding this comment

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

same

tools/README.md Outdated
@@ -0,0 +1,53 @@
# Open SaaS Tools

This directory contains utilities for managing derived projects that are built on top of the Open SaaS template.
Copy link
Member

Choose a reason for hiding this comment

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

Ha for now, it might contain any kind of tools :D! You could probably even leave this sentence out, maybe you don't need to at the moment "prescribe" what this "tools" dir is about.

raw

tools/README.md Outdated

## dope.sh - Diff Or Patch Executor

The `dope.sh` script allows you to easily create a diff between two projects (base and derived), or to patch those diffs onto the base project to get the derived one. This is useful when a derived project has only small changes on top of the base project and you want to keep it in a directory in the same repo as the main project.
Copy link
Member

Choose a reason for hiding this comment

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

+1

tools/README.md Outdated

### Workflow

Since derived apps (like opensaas-sh) are just the Open SaaS template with some small tweaks, and we want to keep them up to date as the template changes, we don't version the actual app code in git. Instead, we version the diffs between it and the template in an `app_diff/` directory.
Copy link
Member

Choose a reason for hiding this comment

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

+1

@infomiho infomiho requested a review from cprecioso October 10, 2025 10:31
@infomiho
Copy link
Collaborator Author

@cprecioso ready

@infomiho infomiho merged commit 57ae0bf into main Oct 10, 2025
1 check passed
@infomiho infomiho deleted the extract-dope-sh-to-top-level branch October 10, 2025 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants