From 39a0581ce3ab7fe67619db804071f40476b93781 Mon Sep 17 00:00:00 2001 From: Andrew <51118083+ArionThinker@users.noreply.github.com> Date: Sun, 21 Jan 2024 20:12:56 +0200 Subject: [PATCH] +ohmyposh.dev (#4928) * new file: projects/ohmyposh.dev/package.yml --- projects/ohmyposh.dev/package.yml | 36 +++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 projects/ohmyposh.dev/package.yml diff --git a/projects/ohmyposh.dev/package.yml b/projects/ohmyposh.dev/package.yml new file mode 100644 index 00000000..2efefda3 --- /dev/null +++ b/projects/ohmyposh.dev/package.yml @@ -0,0 +1,36 @@ +distributable: + url: git+https://github.com/JanDeDobbeleer/oh-my-posh.git + ref: ${{version.tag}} + +versions: + github: JanDeDobbeleer/oh-my-posh + +build: + dependencies: + go.dev: '>=1.21' + script: + - run: go build $ARGS -ldflags="$LDFLAGS" + working-directory: src + - cp -r themes {{prefix}}/ + - run: ln -s ../../themes themes + working-directory: ${{prefix}}/share/oh-my-posh + env: + VERSION_DATE: "$(date -u +%FT%TZ)" + ARGS: + - -trimpath + - -o={{prefix}}/bin/oh-my-posh + LDFLAGS: + - -s + - -w + - -X github.com/jandedobbeleer/oh-my-posh/src/build.Version={{version}} + - -X github.com/jandedobbeleer/oh-my-posh/src/build.Date=${VERSION_DATE} + linux: + LDFLAGS: + - -buildmode=pie + +provides: + - bin/oh-my-posh + +test: + - oh-my-posh --init --shell bash | grep 'oh-my-posh' + - oh-my-posh --version | grep {{version}} \ No newline at end of file