Tired of the weird quirks of make? Annoyed of making typos in long chained commands, or getting to them via reverse-i-search? Well, here is a solution that comes as just an executable for each platform and with an extensive help command.
Find a file
2022-06-10 11:53:22 +02:00
.github/workflows Update build-publish.yml 2022-03-26 15:51:39 +01:00
.idea added --init option to create a Devfile 2022-03-19 13:30:58 +01:00
gradle/wrapper Initial commit 2022-03-11 21:47:44 +01:00
src/nativeMain/kotlin Bumped version to v0.1.1 2022-06-10 11:53:22 +02:00
.gitignore added my development devfile to gitignore 2022-03-23 16:45:18 +01:00
build.gradle.kts upgrade to kotlin 1.7.0 2022-06-10 11:49:42 +02:00
gradle.properties changed argument delimiter to + 2022-03-20 21:55:47 +01:00
gradlew Initial commit 2022-03-11 21:47:44 +01:00
gradlew.bat reformatted and unimportant stuff 2022-03-14 20:38:56 +01:00
LICENSE Create LICENSE 2022-04-07 10:53:25 +02:00
README.md nicer Readme 2022-04-07 11:04:10 +02:00
REFERENCE.md Making the parsing more robust 2022-03-23 16:48:41 +01:00
settings.gradle.kts Initial commit 2022-03-11 21:47:44 +01:00

Devfile

Tired of the weird quirks of make? Annoyed of making typos in long chained commands, or getting to them via reverse-i-search? Well, here is a solution that comes as just an executable for each platform and with an extensive help command.

contributors last update forks stars open issues license


Table of Contents

About the Project

screenshot

Getting Started

Prerequisites

To install with just one command, jq is needed

sudo apt-get install jq

Installation

Either run

wget $(curl -s https://api.github.com/repos/sett17/devfile/releases | jq -r 'first.assets[] | select(.name|startswith("dev-linux")) | .browser_download_url') -O ~/.local/bin/dev && chmod +x ~/.local/bin/dev

or download the latest release executable for your system here and put it somewhere in your PATH.

Build

Clone the project

  git clone https://github.com/Sett17/Devfile.git

Go to the project directory

  cd Devfile

Build native Executables

  gradle nativeBinaries

Usage

To get started, either create a file called Defile or dev.file, or run

dev --init

which creates the file with an example operation.

Note that the example operation only works on Linux executions

To add new operation, you can use your favorite text editor, or run

dev -e

which will open the default editor (or vim as fallback).

Example

Devfile is used in the development of Devfile itself. I use it to update the version and create a new release.

***version*t*+TAG
if [ -z "$DEV_TAG" ]; then
  echo -e '\e[31mYou need to supply a TAG argument'
  exit 1
fi
echo "val version = \"$DEV_TAG\"" > ./src/nativeMain/kotlin/version.kt

git add src/nativeMain/kotlin/version.kt
git commit -m "Bumped version to ${DEV_TAG}"
git push

***release|Creates release with supplied tag*t*+TAG
if [ -z "$DEV_TAG" ]; then
  echo -e '\e[31mYou need to supply a TAG argument'
  exit 1
fi

cmd.exe /c gradle nativeBinaries
cp ./build/bin/native/releaseExecutable/dev.exe dev-windows-${DEV_TAG}.exe

gradle nativeBinaries
cp ./build/bin/native/releaseExecutable/dev.kexe dev-linux-${DEV_TAG}

LAST_RELEASE=$(curl -s https://api.github.com/repos/sett17/devfile/releases | jq -r 'first.tag_name')

echo "https://github.com/Sett17/Devfile/compare/${LAST_RELEASE}...${DEV_TAG}"

gh release create ${DEV_TAG} -n "https://github.com/Sett17/Devfile/compare/${LAST_RELEASE}...${DEV_TAG}" dev-windows-${DEV_TAG}.exe dev-linux-${DEV_TAG}

rm dev-windows-${DEV_TAG}.exe dev-linux-${DEV_TAG}

With this Devfile, I can run dev version+v0.0.69 release+v0.0.69 to bump the version number up and create a new release with linux and windows executables with just one command.

Contributing

Contributions are always welcome!

There are already issues for enhancements, and everyone is welcome to create new ones, or work on some existing issues.

License

Distributed under the GNU General Public License v3.0. See LICENSE for more information.

Acknowledgements

Use this section to mention useful resources and libraries that you have used in your projects.