-
Notifications
You must be signed in to change notification settings - Fork 188
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add automatic publishing of tagged commits
Publishes tagged commits to Github Releases/Luarocks via Travis CI. The deploy phase only exists for tags, and depends on the normal build/test phases completing successfully. Two environment variables are required to deploy: - GITHUB_OAUTH_TOKEN: can be created via https://github.com/settings/tokens, only needs the public_repo scope (alternatively, can be set up via travis's CLI, see https://docs.travis-ci.com/user/deployment/releases/#authenticating-with-an-oauth-token) - LUAROCKS_API_KEY: found at https://luarocks.org/settings/api-keys Note: Committed .rockspecs changed to scm versions (using git as the source url)--versioned rockspecs (along with their .tar.gz) are generated by `.ci/make_rockspec.sh` Addresses #275 (#275 (comment))
- Loading branch information
Showing
6 changed files
with
50 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/sh | ||
|
||
version=$1 | ||
if [ -z "$version" ]; then | ||
echo "must specify a version" >&2 | ||
exit 1 | ||
fi | ||
|
||
# .rockspec | ||
cp luv-scm-0.rockspec luv-${version}.rockspec | ||
cp rockspecs/luv-scm-0.rockspec rockspecs/luv-${version}.rockspec | ||
script="/^version/s@\"[^\"]\\+\"@\"${version}\"@" | ||
sed -e "${script}" -i luv-${version}.rockspec | ||
sed -e "${script}" -i rockspecs/luv-${version}.rockspec | ||
script="s@git://github.com/luvit/luv.git@https://github.com/luvit/luv/releases/download/'..version..'/luv-'..version..'.tar.gz@" | ||
sed -e "${script}" -i luv-${version}.rockspec | ||
sed -e "${script}" -i rockspecs/luv-${version}.rockspec | ||
|
||
# .tar.gz | ||
rm -rf luv-${version} | ||
mkdir -p luv-${version}/deps | ||
cp -r src cmake CMakeLists.txt LICENSE.txt README.md docs.md luv-${version}/ | ||
cp -r deps/libuv deps/lua-compat-5.3 deps/*.cmake deps/lua_one.c luv-${version}/deps/ | ||
COPYFILE_DISABLE=true tar -czvf luv-${version}.tar.gz luv-${version} | ||
rm -rf luv-${version} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
rockspecs/luv-1.22.0-1.rockspec → rockspecs/luv-scm-0.rockspec
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters