File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 8080 luajit_versions : 5.1.5:2.1.0-git
8181 luarocks_versions : 5.1.5:3.8.0
8282 - name : Build
83- run : luarocks make --no-install rockspecs/lua-evdev-dev-1.rockspec
83+ run : |
84+ ./scripts/make-rockspec.sh dev-1
85+ luarocks make --no-install lua-evdev-dev-1.rockspec
8486
8587 publish :
8688 name : publish
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ set -euo pipefail
4+
5+ declare -r package=" lua-evdev"
6+
7+ declare version=" ${1:- } "
8+ declare rockspec_version=" ${version} "
9+
10+ if [[ -z " ${version} " ]]; then
11+ echo " missing version" >&2
12+ exit 1
13+ fi
14+
15+ if [[ " ${version} " != * " -" * ]]; then
16+ rockspec_version=" ${version} -1"
17+ else
18+ version=" ${version%% -* } "
19+ fi
20+
21+ declare -r repo_rockspec=" ${package} .rockspec"
22+ declare -r rockspec=" ${package} -${rockspec_version} .rockspec"
23+
24+ cp " ${repo_rockspec} " " ${rockspec} "
25+
26+ script=" /^version/s|\" [^\" ]\\ +\" |\" ${rockspec_version} \" |"
27+ sed -e " ${script} " -i " ${rockspec} "
28+
29+ if [[ " ${version} " = " dev" ]]; then
30+ script=" /^ \\ +tag/s|\" [^\" ]\\ +\" |nil|"
31+ else
32+ script=" /^ \\ +tag/s|\" [^\" ]\\ +\" |\" ${version} \" |"
33+ fi
34+ sed -e " ${script} " -i " ${rockspec} "
You can’t perform that action at this time.
0 commit comments