HSchroeder / obs-git-update

Used to easily build nightly packages on Open Build Service (OBS).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

obs-git-update

Used to easily build nightly packages on Open Build Service (OBS) (and could be adapted for stable releases using tags).

usage

The script depends on the .spec file being setup to read the version information from two files: {PACKAGE}.version (git describe) and {PACKAGE}.hash (git commit hash).

$ obs-git-update PACKAGE SOURCE_DIR PACKAGING_DIR
# run from openage git clone directory
$ obs-git-update openage . ~/path/to/obs/checkout/openage

spec file

The spec file should be setup similarly to the following (example for package openage).

# Big numbers to abvoid other entries, must precede version declaration.
Source17: openage.version
Source18: openage.hash

# Load version information from files. This allows for sharing for deb
# building, cp to openage_version file, and removes needless changes to spec.
Version:     %(tr -d '\n' < %{SOURCE17})
%define hash %(tr -d '\n' < %{SOURCE18})

Source: https://github.com/SFTtech/openage/archive/%{hash}.tar.gz

# rest of .spec

# If using github or similarly formatted tarballs.
%prep
%setup -q -n %{name}-%{hash}

Full example of openage.spec.

obs service file

Open Build Service (OBS) supports _service files for retrieving source code and verifying instead of checking the source directly into the repository. The script makes use of this mechanism for including source tarball.

To trigger manually osc add {URL}.

About

Used to easily build nightly packages on Open Build Service (OBS).

License:GNU General Public License v2.0


Languages

Language:Shell 100.0%