- Kotlin 100%
| .github/workflows | ||
| .idea | ||
| gradle/wrapper | ||
| src/nativeMain/kotlin | ||
| .gitignore | ||
| build.gradle.kts | ||
| gradle.properties | ||
| gradlew | ||
| gradlew.bat | ||
| LICENSE | ||
| README.md | ||
| REFERENCE.md | ||
| settings.gradle.kts | ||
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.
Table of Contents
About the Project
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.