Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
guillermo committed Feb 15, 2024
1 parent 720d2ff commit cd31fa7
Show file tree
Hide file tree
Showing 2 changed files with 87 additions and 31 deletions.
38 changes: 31 additions & 7 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,6 @@ builds:
- linux
- windows
- darwin
archives:
- replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
checksum:
name_template: 'checksums.txt'
snapshot:
Expand All @@ -30,3 +23,34 @@ changelog:
exclude:
- '^docs:'
- '^test:'
report_sizes: true

nfpms:
- id: made
package_name: made
file_name_template: "{{ .ConventionalFileName }}"
builds:
- made
vendor: Madecommand
homepage: https://github.com/madecommand/made
maintainer: Guillermo Álvarez <[email protected]>

description: |-
made is a command line tool that automates the execution of commands defined in Madefiles and Makefiles, searching for these files in various directories, concatenating their sections, and producing a shell script for execution. It extends the functionality of make by reading not only the Makefile/Madefile in the current directory but also Madefiles in different locations within the system.
license: GPL-3.0
formats:
- deb
- rpm
- archlinux
dependencies:
- zsh
provides:
- made
recommends:
- bash
bindir: /usr/bin

priority: extra


80 changes: 56 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,62 @@
# Made
# Made - Automate all your scripts

Automate all your scripts

## Table of Contents
The **made** program is a command line tool that automates the execution of commands defined in Madefiles and Makefiles, searching for these files in various directories, concatenating their sections, and producing a shell script for execution. It extends the functionality of make by reading not only the **Makefile**/**Madefile** in the current directory but also Madefiles in different locations within the system.

* [Why?](#why)
* [Welcome to <em>madecommand</em>](#welcome-to-madecommand)
* [The Madefile](#the-madefile)
* [The command](#the-command)
* [Where to put the madefiles](#where-to-put-the-madefiles)
* [Install](#install)
* [Update](#update)
> Even if make is an excellent building tool, I only use it to remember long commands.
>
> _Guillermo Álvarez_ author of the made command
## Why?
<details open>
<summary>Table of Contents</summary>

Even if make is an excellent building tool, I only use it today to run some tasks like start development, deploy, compile, etc., without remembering the peculiarities of each project.
<!-- vscode-markdown-toc -->
* [What is made command](#Whatismadecommand)
* [Why?](#Why)
* [The `Madefile`](#TheMadefile)
* [The command](#Thecommand)
* [Where to put the madefiles](#Wheretoputthemadefiles)
* [Install](#Install)
* [Update](#Update)

Whenever I wanted `make` to do more complex scripting, I spent a lot of time because `Makefiles` are not shell scripts, so I needed to relearn how to do it the `make` way.
<!-- vscode-markdown-toc-config
numbering=false
autoSave=true
/vscode-markdown-toc-config -->
<!-- /vscode-markdown-toc -->

Why can't `make` concatenate the scripts in a file and run it?
</details>

## Installation

Download the binary for your system from github and place it within your path.



## Define scripts everywere

Contrary to `make`, `made` not only reads targets from the Makefile in the current directory.

## Welcome to *madecommand*
It reads:

*made* is a command line tool that executes commands defined in `Madefiles`.
* `Madefile`
* `madefiles/*.made`
* `.madefiles/*.made`

The madefiles are text files that contain shell scripts grouped in tasks similar to a Makefile.
And it also loads `Madefiles` from different parts of the system.

When you run *made* with some targets, *madecommand* will concatenate your targets and their dependencies into a single script and run it.
* `Current directory`
* Each directory up until it reaches your HOME or /
* `~/.config/madefiles`
* `~/.local/share/madefiles`
* `/etc/madefiles`
* `/var/lib/madefiles`

## The `Madefile`
## <a name='TheMadefile'></a>The `Madefile`

A madefile looks like this:

```
```Make
# This is a comment
# And the header of the Madefile
# Every thing will be appended to the generated script
Expand Down Expand Up @@ -69,7 +93,7 @@ $ made staging deploy notify
```
## The command
## <a name='Thecommand'></a>The command
```shell
$ made # To display all the tasks
Expand All @@ -94,21 +118,29 @@ $ made run -- help # Pass arguments to the script
```


## Where to put the madefiles
## <a name='Wheretoputthemadefiles'></a>Where to put the madefiles

*madecommand* searches for Madefiles in:
All directories from current up to HOME.

It looks for files called `Madefile` or with `.made` extension, in the directory or inside a `.made` directory.

## Install
## <a name='Install'></a>Install

Visit the [releases page](http://github.com/madecommand/made/releases/latest) download and unpack the binary in `/usr/local/bin`

## Update
## <a name='Update'></a>Update

Just run `made --update`




## <a name='Why'></a>Why?



Whenever I wanted `make` to do more complex scripting, I spent a lot of time because `Makefiles` are not shell scripts, so I needed to relearn how to do it the `make` way.

Why can't `make` concatenate the scripts in a file and run it?

0 comments on commit cd31fa7

Please sign in to comment.