-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
27 additions
and
130 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 |
---|---|---|
|
@@ -6,4 +6,5 @@ polkadot | |
|
||
cargo/ | ||
pkg/ | ||
polkadot_binary/ | ||
polkadot_binary/ | ||
kagome_runtime/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,38 +2,33 @@ | |
|
||
set -euo pipefail | ||
|
||
# Function to display usage | ||
usage() { | ||
echo "Usage: $0 <version> <architecture> <package_name> <artifacts_dir> <description> <dependencies>" | ||
echo "Example: $0 1.0 amd64 mypackage /path/to/artifacts 'libc6, libssl1.1'" | ||
echo "Usage: $0 <version> <architecture> <package_name> <artifacts_dir> <description> <dependencies> [<binary_install_dir>]" | ||
echo "Example: $0 1.0 amd64 mypackage /path/to/artifacts 'libc6, libssl1.1' /usr/local/bin" | ||
exit 1 | ||
} | ||
|
||
# Function to log messages | ||
log() { | ||
local MESSAGE=$1 | ||
echo "[INFO] $MESSAGE" | ||
} | ||
|
||
# Check for the correct number of arguments | ||
if [ "$#" -ne 6 ]; then | ||
if [ "$#" -lt 6 ] || [ "$#" -gt 7 ]; then | ||
usage | ||
fi | ||
|
||
# Assign variables from arguments | ||
VERSION=$1 | ||
ARCHITECTURE=$2 | ||
PACKAGE_NAME=$3 | ||
ARTIFACTS_DIR=$4 | ||
DESCRIPTION=$5 | ||
DEPENDENCIES=$6 | ||
BINARY_INSTALL_DIR=${7:-/usr/local/bin} | ||
|
||
# Define maintainer and homepage variables | ||
MAINTAINER="Zak Fein <[email protected]>" | ||
HOMEPAGE="https://qdrvm.io" | ||
DIR_NAME=${PACKAGE_NAME}_${VERSION}_${ARCHITECTURE} | ||
|
||
# Validate parameters | ||
log "Validating parameters..." | ||
|
||
if [ -z "$VERSION" ]; then | ||
|
@@ -68,20 +63,23 @@ fi | |
|
||
log "Creating package directory structure..." | ||
mkdir -p ./pkg/${DIR_NAME}/DEBIAN | ||
mkdir -p ./pkg/${DIR_NAME}/usr/local/bin | ||
mkdir -p ./pkg/${DIR_NAME}${BINARY_INSTALL_DIR} | ||
|
||
log "Working directory: $(pwd)/pkg/" | ||
|
||
log "Copying artifacts..." | ||
mv -f ${ARTIFACTS_DIR}/* ./pkg/${DIR_NAME}/usr/local/bin/ | ||
|
||
echo "Package: ${PACKAGE_NAME}" | ||
echo "Version: ${VERSION}" | ||
echo "Maintainer: ${MAINTAINER}" | ||
echo "Depends: ${DEPENDENCIES}" | ||
echo "Architecture: ${ARCHITECTURE}" | ||
echo "Homepage: ${HOMEPAGE}" | ||
echo "Description: ${DESCRIPTION}" | ||
echo "Artifacts: ${ARTIFACTS_DIR}" | ||
echo "Directory: ./pkg/${DIR_NAME}/usr/local/bin/" | ||
mv -f ${ARTIFACTS_DIR}/* ./pkg/${DIR_NAME}${BINARY_INSTALL_DIR}/ | ||
|
||
log "Package: ${PACKAGE_NAME}" | ||
log "Version: ${VERSION}" | ||
log "Maintainer: ${MAINTAINER}" | ||
log "Depends: ${DEPENDENCIES}" | ||
log "Architecture: ${ARCHITECTURE}" | ||
log "Homepage: ${HOMEPAGE}" | ||
log "Description: ${DESCRIPTION}" | ||
log "Artifacts: ${ARTIFACTS_DIR}" | ||
log "Binary Install Directory: ${BINARY_INSTALL_DIR}" | ||
log "Directory: ./pkg/${DIR_NAME}${BINARY_INSTALL_DIR}/" | ||
|
||
log "Creating control file..." | ||
cat <<EOF > ./pkg/${DIR_NAME}/DEBIAN/control | ||
|
103 changes: 0 additions & 103 deletions
103
housekeeping/docker/kagome-dev/build_apt_package_runtime.sh
This file was deleted.
Oops, something went wrong.