File: package.sh

package info (click to toggle)
luacheck 1.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,704 kB
  • sloc: sh: 106; makefile: 96; python: 35
file content (39 lines) | stat: -rwxr-xr-x 791 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env bash
set -eu
set -o pipefail

# Creates rockspec and source rock for a new Luacheck release given version number.
# Should be executed from root Luacheck directory.
# Resulting rockspec and rock will be in `package/`.

version="$1"

rm -rf package
mkdir package
cd package


echo
echo "=== Creating rockspec for Luacheck $version ==="
echo

luarocks new-version ../luacheck-dev-1.rockspec --tag="$version"

echo
echo "=== Copying Luacheck files ==="
echo

mkdir luacheck
cp -r ../src luacheck
mkdir luacheck/bin
cp ../bin/luacheck.lua luacheck/bin
cp -r ../doc luacheck
cp ../README.md ../CHANGELOG.md ../LICENSE luacheck

echo
echo "=== Packing source rock for Luacheck $version ==="
echo

zip -r luacheck-"$version"-1.src.rock luacheck luacheck-"$version"-1.rockspec

cd ..