From e0ae2b33cb493812deb9707a6fe6ae1dbf33dd2e Mon Sep 17 00:00:00 2001 From: Antonio Terceiro Date: Thu, 26 Feb 2015 14:16:57 -0300 Subject: [PATCH] Automate uploads to OBS --- .gitignore | 1 + Makefile | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 0 deletions(-) create mode 100644 .gitignore create mode 100644 Makefile diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..cfdd3bf --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/obs diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..97d0c81 --- /dev/null +++ b/Makefile @@ -0,0 +1,17 @@ +all: + @echo "Usage:" + @echo + @echo 'make gitlab # uploads gitlab.spec to obs' + @echo 'make gitlab-shell # uploads gitlab-shell.spec to obs' + +gitlab gitlab-shell: + $(MAKE) upload PACKAGE=$@ + +obs_project = isv:spb:gitlab + +upload: + test -n "$(PACKAGE)" + mkdir -p obs + test -d obs/$(obs_project)/$(PACKAGE) || (cd obs && osc checkout $(obs_project) $(PACKAGE)) + cp $(PACKAGE).spec obs/isv:spb:gitlab/$(PACKAGE)/ + cd obs/isv:spb:gitlab/$(PACKAGE) && osc commit -m 'Update $(PACKAGE)' -- libgit2 0.21.2