I have a make file I want to call from cmd raise_inventory_event and provide both parameters
raise_inventory_event: check_publish
@echo "Raises inventory event"
dotnet publish\Commander.Console.dll inventory-event-publish --sku (SKU)−−available(AVAILABLE)
Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Of course! To call that make target and provide the SKU and AVAILABLE parameters from the command line, you simply specify them as VARIABLE=value pairs after the target name.
The Command
Open your command prompt (cmd), navigate to the directory containing your Makefile, and run the following command. Just replace the example values with your actual SKU and available quantity.
cmd
make raise_inventory_event SKU=YOUR_SKU_HERE AVAILABLE=YOUR_QUANTITY_HERE
Concrete Example
Let's say you want to set the SKU to TSHIRT-RED-L and the available quantity to 50. The command would be:
cmd
make raise_inventory_event SKU=TSHIRT-RED-L AVAILABLE=50
How it Works
When you run this command, make does the following:
It receives the command-line variable assignments SKU=TSHIRT-RED-L and AVAILABLE=50.
It finds the target raise_inventory_event.
It first runs the prerequisite target, check_publish.
Then, it executes the command for raise_inventory_event, substituting the variables $(SKU) and $(AVAILABLE) with the values you provided.
The final command that gets executed will look like this to your system:
No Spaces: Make sure there are no spaces around the = sign (e.g., SKU = value is incorrect).
Values with Spaces: If your SKU or another value contains spaces, you must wrap it in quotes.
cmd
make raise_inventory_event SKU="My Awesome T-Shirt" AVAILABLE=25
Prerequisites: Make sure you have make installed and accessible in your system's PATH. You can check by running make -v. If you don't have it, a common way to get it on Windows is by installing it via Chocolatey or as part of the tools included with Git for Windows.