Comments (10)
Agree that we should add functionality to support a git checkout. I think it would be best to use an associative array for the project list. A project name and git ref to checkout. It would be good to also remove assumption of the Github organization too and add that to the project name.
from reaction-development-platform.
cc @ticean
from reaction-development-platform.
A related issue is that make
doesn't prompt you for which branch of each repo to check out. It just starts cloning and building, which is a waste of time of you're going to have to stop the service, checkout a different release, and rebuild it after it's done.
from reaction-development-platform.
Some thoughts on how this could work:
The Makefile currently defines an array of projects. Most of the targets are created by some metaprogramming that iterate over the list. There are some global assumptions currently made in the file that need to be addressed.
- That all projects are in the
reactioncommerce
Github organization. - That the
master
branch of each project will be used.
Proposed Solution
Declare data in a way that does not make these assumptions.
- If possible, use a multi-dimensional array to declare
($org/$project $git_ref)
. Or, find another workaround to get the data points into the targets. - Modify the cloning targets so that the organization isn't hardcoded.
- Add a checkout step that would checkout to a git ref after clone.
- Modify the existing target meta templates to accept and use the various parts from the new data structure.
from reaction-development-platform.
So one thing I figured out as a note to self is we could in theory have one variable be a list of repo URLs and parse out the repo directory names as another variable like this:
[email protected]/reactioncommerce/reaction-hydra.git\#master \
[email protected]/reactioncommerce/reaction.git\#master \
[email protected]/reactioncommerce/reaction-next-starterkit.git\#master
# Yeah, there's a bunch of make and shell and sed escaping here. Sorry.
REACTION_PROJECT_NAMES=$(foreach rp,$(REACTION_PROJECT_URLS),$(shell basename $(rp) | cut -d \\\# -f 1 | sed 's/\.git$$//'))
That does seem to work BUT it uses unix stuff so is that a dealbreaker for windows installs?
from reaction-development-platform.
Make doesn't work on Windows anyway, does it?
@ticean I like your solution, and it should be keyed by version as well, i.e., platform version X = these 5 repos w/ checkout tags. In my perfect world, this would be defined in a separate file, ideally JSON or YAML. Not sure how easy it is to parse those in Make.
And on the subject of Make... I still think it would be better to find a different task runner that will work on any OS. Otherwise we are saying, "yeah we still support Windows, just use Docker" and "you should really use platform to bootstrap everything" but those statements are incompatible.
from reaction-development-platform.
OK I have a WIP pull request for adding checkout capabilities and a very simple manifest without much new code. Apologies about how inscrutable the make metaprogramming and escaping makes things, but I think it does what's strictly necessary here.
More broadly we should figure out our Windows story. As it is it's using GNU make which I believe doesn't directly work on Windows but there seem to be some cygwin-style ports. Dunno. But we're also using a handful of POSIX things like awk, xargs, cut, grep, etc so we'd at least have to require POSIX tools as a prereq.
I'd be OK with scripting things as node scripts or going all-docker if we start to run into limitations of only relying on basic text utilities.
from reaction-development-platform.
@aldeed revisiting your initial description of this feature, I guess we could add a data file for that. If we could use jq
the data munging would be a lot less fidgety. Maybe JSON files like releases/2.0.json
{
"subProjects": [
{"name": "reaction-hydra", "gitUrl": "[email protected]:reactioncommerce/reaction-hydra.git", "tag": "2.0"},
{"name": "reaction-next-starterkit", "gitUrl": "[email protected]:reactioncommerce/reaction-next-starterkit.git", "tag": "1.7"}
]
}
from reaction-development-platform.
Note to self: jq -r ".\"2.0\".subProjects[].gitUrl" < releases.json
from reaction-development-platform.
OK to keep scope well-tracked, I'm going to file a separate issue to discuss the toolchain choice. Let's keep this issue about a checkout command specifically. We may decide not to implement on top of the existing toolchain and Makefile.
from reaction-development-platform.
Related Issues (20)
- Could not connect to Hydra service at http://hydra.reaction.localhost:4445 HOT 1
- Deprecate/remove old repos HOT 7
- can't run reaction-admin container in DEV mode HOT 1
- Wrong reaction docker image version HOT 4
- Question: How to find make command on Windows? HOT 3
- Can't find GraphQL API docker container after installing
- Simplify make commands HOT 2
- navigation in dashboard not working HOT 3
- Call prepareTrunk() & update config in the release script
- Create a guide for release process HOT 1
- Add integration tests to all plugins.
- Remove .DS_Store
- Unable to build using docker compose v2 on ubuntu running aws-graviton [ARM}
- Create a document walking through the release process. HOT 1
- Fails on Mac OS Monterey 12.2.1
- Npm is tryed rename plugin inside container
- ERROR: could not find an available, non-overlapping IPv4 address pool among the defaults to assign to the network
- Add deprecation message to README HOT 1
- After conversion to monorepo, change git clone locations
- Sponsored issue: Shopping Cart Data Sync Issue Affecting Checkout Page
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from reaction-development-platform.