mirror of
				https://gitea.invidious.io/iv-org/shard-ameba.git
				synced 2024-08-15 00:53:29 +00:00 
			
		
		
		
	Install binary to shard/bin folder
Just a workaround before https://github.com/crystal-lang/shards/pull/126 becomes live.
This commit is contained in:
		
							parent
							
								
									7546a80f1c
								
							
						
					
					
						commit
						6a28e21162
					
				
					 3 changed files with 18 additions and 2 deletions
				
			
		
							
								
								
									
										4
									
								
								Makefile
									
										
									
									
									
								
							
							
						
						
									
										4
									
								
								Makefile
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -1,5 +1,6 @@
 | 
			
		|||
CRYSTAL_BIN ?= $(shell which crystal)
 | 
			
		||||
PREFIX ?= /usr/local
 | 
			
		||||
SHARD_BIN ?= ../../bin
 | 
			
		||||
 | 
			
		||||
build:
 | 
			
		||||
	$(CRYSTAL_BIN) build --release --no-debug -o bin/ameba src/cli.cr $(CRFLAGS)
 | 
			
		||||
| 
						 | 
				
			
			@ -8,6 +9,9 @@ clean:
 | 
			
		|||
install: build
 | 
			
		||||
	mkdir -p $(PREFIX)/bin
 | 
			
		||||
	cp ./bin/ameba $(PREFIX)/bin
 | 
			
		||||
bin: build
 | 
			
		||||
	mkdir -p $(SHARD_BIN)
 | 
			
		||||
	cp ./bin/ameba $(SHARD_BIN)
 | 
			
		||||
test: build
 | 
			
		||||
	$(CRYSTAL_BIN) spec
 | 
			
		||||
	./bin/ameba
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										13
									
								
								README.md
									
										
									
									
									
								
							
							
						
						
									
										13
									
								
								README.md
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -37,7 +37,18 @@ development_dependencies:
 | 
			
		|||
    github: veelenga/ameba
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Compile and install `ameba` binary onto your system while running `crystal deps`.
 | 
			
		||||
Build `bin/ameba` binary within your project directory while running `crystal deps`.
 | 
			
		||||
 | 
			
		||||
You may want also use it on [Travis](travis-ci.org):
 | 
			
		||||
 | 
			
		||||
```yaml
 | 
			
		||||
language: crystal
 | 
			
		||||
install:
 | 
			
		||||
  - crystal deps
 | 
			
		||||
script:
 | 
			
		||||
  - crystal spec
 | 
			
		||||
  - bin/ameba
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
### OS X
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -7,7 +7,8 @@ authors:
 | 
			
		|||
  - Vitalii Elenhaupt <velenhaupt@gmail.com>
 | 
			
		||||
 | 
			
		||||
scripts:
 | 
			
		||||
  postinstall: make build
 | 
			
		||||
  postinstall: make bin
 | 
			
		||||
 | 
			
		||||
# https://github.com/crystal-lang/shards/pull/126
 | 
			
		||||
executables:
 | 
			
		||||
  - ameba
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue