Makefile to download needed bin

Permit to download easily just and pixi binary without custom software
This commit is contained in:
2023-12-16 01:55:41 +01:00
parent 52c07aeb89
commit e5b0e19053
3 changed files with 65 additions and 0 deletions

1
.gitignore vendored
View File

@@ -1,3 +1,4 @@
# pixi environments
.pixi
mailpit
.bin

32
Makefile Normal file
View File

@@ -0,0 +1,32 @@
ARCH ?= x86_64-unknown-linux-musl
JUST_VERSION ?= 1.16.0
JUST_TGZ ?= just-$(JUST_VERSION)-$(ARCH).tar.gz
PIXI_VERSION ?= 0.10.0
PIXI_TGZ ?= pixi-$(PIXI_VERSION)-$(ARCH).tar.gz
all: just pixi
@echo "You can add .bin folder in your path to enjoy pixi and just:" 'export PATH=$$PATH:$$(pwd)/.bin'
PATH=$$PATH:$(pwd)/.bin just
just: .bin/just
.bin/just: init .bin/$(JUST_TGZ)
tar xf ./.bin/$(JUST_TGZ) -C ./.bin just
@echo "just downloaded. Run './.bin/just' command to exec"
.bin/$(JUST_TGZ):
curl -L https://github.com/casey/just/releases/download/$(JUST_VERSION)/just-$(JUST_VERSION)-$(ARCH).tar.gz -o ./.bin/$(JUST_TGZ)
pixi: .bin/pixi
.bin/pixi: init .bin/$(PIXI_TGZ)
tar xf ./.bin/$(PIXI_TGZ) -C ./.bin ./pixi
@echo "pixi downloaded. Run './.bin/pixi' command to exec"
.bin/$(PIXI_TGZ):
curl -L https://github.com/prefix-dev/pixi/releases/download/v$(PIXI_VERSION)/pixi-$(ARCH).tar.gz -o ./.bin/$(PIXI_TGZ)
init:
mkdir -p .bin

View File

@@ -47,3 +47,35 @@ Hey boy, what is the `pit.db` file?
Oh, just for fun, and because I love this project, I use [pit by michaeldv](https://github.com/michaeldv/pit) to follow my task etc.
It makes me think I should push my python version of this project on occasion when I will take the time to do...
How to build it?
----------------
This project use two very cool projets to handle env & build:
- [**just**](https://github.com/casey/just) as an alternative to [GNU Make](https://www.gnu.org/software/make/manual/make.html)
- [**pixi**](https://github.com/prefix-dev/pixi) to manage python & dependancies environnment without question
You can install these two software by your way, or use the Makefile to do it: `$ make`.
This command will download & untar `just` and `pixie` into a hidden `.bin` folder and launch just target to do the rest.
> Don't forget to set a valid SMTP host/port in `config.ini`. Otherwise, notifier execution will fail. See below if you want to get a wrapper
Just's targets permit to:
- just run the script
- build a docker image
- create a release
- etc.
Use `.bin/just --list` to list all available target.
### Use mailpit to wrap mails
If you don't want to really send and receive mail, e.g. to test... things! I recommand [**mailpit**](https://github.com/axllent/mailpit).
You can quickly get it with just: `.bin/just get-mail-wrapper`.
Then execute-it: `./mailpit`.
By default, SMTP port is `1025`, and HTTP port to access to interface is `8025`.