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.
This is a rewrite in golang from the original version written in kotlin. This old version can be accessed here. Note that many of the issues still in the kotlin native version, are fixed in this version
To install Devfile from the command line you need to have go installed.
go install github.com/Sett17/dev@latest
or download the latest release executable for your system here and put it somewhere in your PATH.
To update Devfile you first need to remove thr currently installed version.
rm $GOPATH/bin/dev
Then you can follow the steps from Installation.
Clone the project
git clone https://github.com/Sett17/dev.git
Go to the project directory
cd dev
And get the dependencies and build
go get -x
go build
To get started, either create a file called devfile
And populate it with operations, according to the REFERENCE.md section.
This an example of the Devfile used in the developement of Devfile.
With this I can update the version and release a new version to GitHub by simply running dev version+vX.Y.Z release+vX.Y.Z
.
***version*t*+VERSION
if [ -z "$DEV_VERSION" ]; then
echo "VERSION not set"
exit 1
fi
echo "Setting version to $DEV_VERSION"
echo -e "package global\nconst Version = \"${DEV_VERSION}\"" > global/version.go
gofmt -w global/version.go
git add global/version.go
git commit -m "BBumped version to $DEV_VERSION"
git push
***release*t*+VERSION
if [ -z "$DEV_VERSION" ]; then
echo "VERSION not set"
exit 1
fi
go build .
cmd.exe /c go build .
LAST_RELEASE=$(curl -s https://api.github.com/repos/sett17/dev/releases | jq -r 'first.tag_name')
echo "https://github.com/Sett17/dev/compare/${LAST_RELEASE}...${DEV_VERSION}"
gh release create ${DEV_VERSION} -n "https://github.com/Sett17/dev/compare/${LAST_RELEASE}...${DEV_VERSION}" dev dev.exe
rm dev.exe dev
***update*t*
rm -v $GOPATH/bin/dev
go install github.com/Sett17/dev@latest
echo -e "\e[32mUpdated linux version\e[0m"
cmd.exe /c del /s %userprofile%\\go\\bin\\dev.exe
cmd.exe /c go install github.com/Sett17/dev@latest
echo -e "\e[32mUpdated windows version\e[0m"
Contributions are always welcome!
There are already issues for enhancements, and everyone is welcome to create new ones, or work on some existing issues.
Distributed under the GNU General Public License v3.0. See LICENSE for more information.
Use this section to mention useful resources and libraries that you have used in your projects.