File: launchpad.sh

package info (click to toggle)
keyman 18.0.245-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 21,316 kB
  • sloc: python: 52,784; cpp: 21,278; sh: 7,633; ansic: 4,823; xml: 3,617; perl: 959; makefile: 139; javascript: 138
file content (61 lines) | stat: -rwxr-xr-x 1,763 bytes parent folder | download
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/bash

# Build source packages from nightly builds and upload to PPA

# must be run from linux dir

# parameters: [UPLOAD="yes"] [PROJECT="<project>"] [DIST="<dist>"] [PACKAGEVERSION="<version>"] ./scripts/launchpad.sh
# UPLOAD="yes" do the dput for real
# PROJECT="<project>" only upload this project
# DIST="<dist>" only upload for this distribution
# PACKAGEVERSION="<version>" string to append to the package version. Default to "1~sil1"

set -eu

## START STANDARD BUILD SCRIPT INCLUDE
# adjust relative paths as necessary
THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")"
# shellcheck source=resources/build/build-utils.sh
. "${THIS_SCRIPT%/*}/../../resources/build/build-utils.sh"
## END STANDARD BUILD SCRIPT INCLUDE

# shellcheck source=linux/scripts/package-build.inc.sh
. "$(dirname "$THIS_SCRIPT")/package-build.inc.sh"

checkPrerequisites

if [ "${TIER}" == "stable" ]; then
    ppa="ppa:keymanapp/keyman"
elif [ "${TIER}" == "beta" ]; then
    ppa="ppa:keymanapp/keyman-beta"
else
    ppa="ppa:keymanapp/keyman-alpha"
fi
echo "ppa: ${ppa}"

distributions="${DIST:-jammy noble plucky questing}"
packageversion="${PACKAGEVERSION:-1~sil1}"

BASEDIR=$(pwd)

rm -rf launchpad
mkdir -p launchpad

for proj in ${projects:-}; do
    downloadSource launchpad

    cd "${proj}-${version:-}"
    pwd
    cp debian/changelog "../${proj}-changelog"
    for dist in ${distributions}; do
        cp "../${proj}-changelog" debian/changelog
        dch -v "${version}-${packageversion}~${dist}" "source package for PPA"
        dch -D "${dist}" -r ""
        debuild -d -S -sa -Zxz
    done
    cd ..
    for dist in ${distributions}; do
        dput ${SIM} ${ppa} "${proj}_${version}-${packageversion}~${dist}_source.changes"
    done
    cd "${BASEDIR}"
done