mirror of
https://github.com/Interlisp/maiko.git
synced 2026-02-26 16:53:30 +00:00
Add scripts to aid in constructing github releases of the maiko artifacts (#395)
Until these are superceded by github actions, if the github CLI tool "gh" is installed, a github release of the maiko code can be created by running ./start-release from the maiko/bin directory, and then running ./release-one for each combination of OS/architecture that should be included in the release. The scripts assume that the maiko code is checked out in a directory named "maiko" (and may produce unexpected results if run from somewhere else) Co-authored-by: Nick Briggs <nicholas.h.briggs@gmail.com>
This commit is contained in:
44
bin/release-one
Executable file
44
bin/release-one
Executable file
@@ -0,0 +1,44 @@
|
||||
#!/bin/sh
|
||||
# Make and release maiko for one os / arch
|
||||
# Hopefully to be replaced by GitHub Action
|
||||
|
||||
if [ ! -x ../../maiko/bin/machinetype ] ; then
|
||||
echo ERROR: Must be run from maiko/bin
|
||||
exit 1
|
||||
fi
|
||||
|
||||
tag=$1
|
||||
if [ -z "$tag" ] ; then
|
||||
tag=maiko-`date +%y%m%d`
|
||||
fi
|
||||
|
||||
export PATH=.:"$PATH"
|
||||
osarch=`osversion`.`machinetype`
|
||||
|
||||
|
||||
./makeright x
|
||||
./makeright init
|
||||
|
||||
cd ../..
|
||||
mkdir -p maiko/build
|
||||
echo making $tag-$osarch.tgz
|
||||
|
||||
tar cfz maiko/build/$tag-$osarch.tgz \
|
||||
maiko/bin/osversion \
|
||||
maiko/bin/machinetype \
|
||||
maiko/bin/config.guess \
|
||||
maiko/bin/config.sub \
|
||||
maiko/$osarch/lde*
|
||||
|
||||
if ! command -v gh >/dev/null ; then
|
||||
echo
|
||||
echo The GitHub Command Line Interface, gh
|
||||
echo does not seem to be installed.
|
||||
echo Please upload maiko/build/$tag-$osarch.tgz
|
||||
echo to https://github.com/Interlisp/maiko/releases $tag
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo uploading
|
||||
cd maiko
|
||||
gh release upload --clobber $tag build/$tag-$osarch.tgz
|
||||
36
bin/start-release
Executable file
36
bin/start-release
Executable file
@@ -0,0 +1,36 @@
|
||||
#!/bin/sh
|
||||
# This script is just a placeholder until we get GitHub
|
||||
# Actions to do releases
|
||||
|
||||
# Start Maiko release from maiko/bin
|
||||
# startrelease [tag]
|
||||
# tag defaults to maiko-YYMMDD
|
||||
|
||||
tag=$1
|
||||
if [ -z "$tag" ] ; then
|
||||
tag=maiko-`date +%y%m%d`
|
||||
fi
|
||||
|
||||
if ! command -v gh >/dev/null ; then
|
||||
echo "It seems like 'gh', the GitHub Command Line Interface is"
|
||||
echo "not installed. You can start a release using the"
|
||||
echo "web interface at"
|
||||
echo "https://github.com/Interlisp/maiko/releases/new"
|
||||
echo "Make up a tag (or use $tag)"
|
||||
echo "and run './release-one tag' (or manually upload if"
|
||||
echo "no 'gh' is installed) on every os/machine you want"
|
||||
echo "this release to work for"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Now for the only thing this script is actually doing
|
||||
|
||||
gh release create $tag -p -t $tag -n "See release notes in medley repo"
|
||||
|
||||
|
||||
echo "Now run "
|
||||
echo ./release-one $tag
|
||||
echo "in maiko/bin on every os/machine you want this release"
|
||||
echo "to work for. When done, edit the release in your"
|
||||
echo "browser and uncheck the prerelease box "
|
||||
|
||||
Reference in New Issue
Block a user