Test commit for new branch
This commit is contained in:
parent
7f02d6acec
commit
dad63a0ad4
28
.build.yml
28
.build.yml
@ -2,6 +2,7 @@ image: ubuntu/focal
|
||||
|
||||
secrets:
|
||||
- 31c0c342-c396-4190-9637-1c3cedd705a5 # SSH key
|
||||
- 4e6bb736-559c-4b3e-ba04-331f5808cacc # aptrepo SSH key (to upload the build result to apt.playfulpachyderm.com)
|
||||
- 8803f94a-8b8b-4966-aac7-4b8e24c328ce # Gitlab access token
|
||||
- c84e3f2c-7c97-4cef-859e-8b13de32a7be # ~/.ssh/known_hosts (gitlab.com)
|
||||
|
||||
@ -69,3 +70,30 @@ tasks:
|
||||
|
||||
duration=$SECONDS
|
||||
echo "Task completed in $(($duration / 60))m$(($duration % 60))s."
|
||||
|
||||
- dpkg_build: |
|
||||
version=$(git rev-parse --abbrev HEAD | grep -Poh "(?<=release-)\d+\.\d+\.\d+")
|
||||
|
||||
if [[ -z "$version" ]]
|
||||
then
|
||||
# Not on a release branch; just exit this task
|
||||
exit
|
||||
fi
|
||||
|
||||
SECONDS=0
|
||||
|
||||
cd twitter_offline_engine/build
|
||||
./build_dpkg.sh $version
|
||||
|
||||
duration=$SECONDS
|
||||
echo "Task completed in $(($duration / 60))m$(($duration % 60))s."
|
||||
|
||||
- upload_dpkg: |
|
||||
# Just fail
|
||||
test -z "fjkjksdf"
|
||||
|
||||
|
||||
# SECONDS=0
|
||||
|
||||
# cd twitter_offline_engine/build
|
||||
# scp offline
|
||||
|
2
build/.gitignore
vendored
Normal file
2
build/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
dpkg_tmp
|
||||
*.deb
|
43
build/build_dpkg.sh
Executable file
43
build/build_dpkg.sh
Executable file
@ -0,0 +1,43 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
if [[ -z "$1" ]]
|
||||
then
|
||||
# Error message and exit
|
||||
>&2 echo "No version number provided! Exiting."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Compile the program
|
||||
(cd ../cmd && ./compile.sh)
|
||||
|
||||
# Prepare the output folder
|
||||
if [[ -e dpkg_tmp ]]
|
||||
then
|
||||
rm -rf dpkg_tmp
|
||||
fi
|
||||
mkdir dpkg_tmp
|
||||
|
||||
# Construct the dpkg directory structure
|
||||
mkdir -p dpkg_tmp/usr/local/bin
|
||||
cp ../cmd/tw dpkg_tmp/usr/local/bin
|
||||
|
||||
# Create the `DEBIAN/control` file
|
||||
mkdir dpkg_tmp/DEBIAN
|
||||
echo "Package: offline-twitter-engine
|
||||
Version: $1
|
||||
Architecture: all
|
||||
Maintainer: me@playfulpachyderm.com
|
||||
Installed-Size: 7200
|
||||
Depends:
|
||||
Section: web
|
||||
Priority: optional
|
||||
Homepage: http://offline-twitter.com
|
||||
Description: This utility is the scraper engine that drives \`offline-twitter\`.
|
||||
Download and browse content from twitter.
|
||||
Save a local copy of everything you browse.
|
||||
" > dpkg_tmp/DEBIAN/control
|
||||
|
||||
|
||||
dpkg-deb --build `pwd`/dpkg_tmp .
|
Loading…
x
Reference in New Issue
Block a user