mirror of
				https://github.com/vector-im/element-web.git
				synced 2025-10-31 08:11:16 +01:00 
			
		
		
		
	Because supplying arguments to npm scripts is a bad idea: it just appends the arguments blindly to whatever the command was. Thanks, npm.
		
			
				
	
	
		
			20 lines
		
	
	
		
			367 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			367 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
| #!/bin/sh
 | |
| 
 | |
| set -e
 | |
| 
 | |
| if [ -n "$DIST_VERSION" ]; then
 | |
|     version=$DIST_VERSION
 | |
| else
 | |
|     version=`git describe --dirty --tags || echo unknown`
 | |
| fi
 | |
| 
 | |
| npm run build
 | |
| mkdir -p dist
 | |
| cp -r vector vector-$version
 | |
| echo $version > vector-$version/version
 | |
| tar chvzf dist/vector-$version.tar.gz vector-$version
 | |
| rm -r vector-$version
 | |
| 
 | |
| echo
 | |
| echo "Packaged dist/vector-$version.tar.gz"
 |