https://github.com/burtlo/snap
This contains a number of helper methods to use within a Habitat Studio session
https://github.com/burtlo/snap
habitat habitat-studio helpers
Last synced: 9 months ago
JSON representation
This contains a number of helper methods to use within a Habitat Studio session
- Host: GitHub
- URL: https://github.com/burtlo/snap
- Owner: burtlo
- Created: 2017-10-24T03:37:24.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-10-25T16:11:17.000Z (about 8 years ago)
- Last Synced: 2025-02-10T20:27:58.629Z (11 months ago)
- Topics: habitat, habitat-studio, helpers
- Language: Shell
- Homepage: https://habitat.sh
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Snap
Make working with plans a snap. This is a set of tools that assist working with the packages built and stored in the `./results` directory by giving an easier way to index them.

## Install
```bash
$ hab studio enter
(studio) $ hab pkg install franklinwebber/snap -b
```
## Using
Build your plans as you would.
```bash
$ build
```
Then run the `list` command:
```bash
$ list pkg_name
HEAD~5 - ./results/franklinwebber-snap-0.1.0-20171024033304-x86_64-linux.hart
HEAD~4 - ./results/franklinwebber-snap-0.1.0-20171024034255-x86_64-linux.hart
HEAD~3 - ./results/franklinwebber-snap-0.1.0-20171024035828-x86_64-linux.hart
HEAD~2 - ./results/franklinwebber-snap-0.1.0-20171024042033-x86_64-linux.hart
HEAD~1 - ./results/franklinwebber-snap-0.1.0-20171024042159-x86_64-linux.hart
HEAD - ./results/franklinwebber-snap-0.1.1-20171024050350-x86_64-linux.hart
```
Start the second-to-last built package as a service
```bash
$ start pkg_name HEAD~1
# OR
$ start pkg_name ~1
```
Stop the service
```bash
$ stop pkg_name
```
Install the last built package and force it to binlink
```bash
$ install pkg_name HEAD -b -f
```
Upload the last built package
```bash
$ upload pkg_name HEAD
# OR
$ upload pkg_name
```
## Development
Prior to this project I would describe myself as new to the BASH language. This is a way for me to learn how to work with the language and make some tools for myself. If you can make the things better I would love a pull request or comments on the code.