From cd31fa7638a81cbfd9153293e15fb166cfdbfaeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20A=CC=81lvarez?= Date: Thu, 15 Feb 2024 13:31:10 +0100 Subject: [PATCH] WIP --- .goreleaser.yaml | 38 ++++++++++++++++++----- README.md | 80 +++++++++++++++++++++++++++++++++--------------- 2 files changed, 87 insertions(+), 31 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 6f8696c..fb35f2c 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -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: @@ -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 + + 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 + + diff --git a/README.md b/README.md index 0d1bba9..253b59b 100644 --- a/README.md +++ b/README.md @@ -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 madecommand](#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? +
+ Table of Contents -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. + +* [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. + + -Why can't `make` concatenate the scripts in a file and run it? +
+ +## 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` +## 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 @@ -69,7 +93,7 @@ $ made staging deploy notify ``` -## The command +## The command ```shell $ made # To display all the tasks @@ -94,21 +118,29 @@ $ made run -- help # Pass arguments to the script ``` -## Where to put the madefiles +## 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 +## Install Visit the [releases page](http://github.com/madecommand/made/releases/latest) download and unpack the binary in `/usr/local/bin` -## Update +## Update Just run `made --update` +## 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? +