-
Notifications
You must be signed in to change notification settings - Fork 4
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
1 parent
65ec02a
commit 0c36376
Showing
6 changed files
with
163 additions
and
6 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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Build | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Prepare | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
show-progress: false | ||
- uses: gittools/actions/gitversion/[email protected] | ||
with: | ||
versionSpec: '5.12.x' | ||
- uses: gittools/actions/gitversion/[email protected] | ||
id: gitversion | ||
|
||
# Build | ||
- name: Inject version number | ||
run: sed -i "s/^version = '.*'$/version = '${{steps.gitversion.outputs.legacySemVer}}'/" 0bootstrap | ||
- name: 0template | ||
run: ./0install.sh run https://apps.0install.net/0install/0template.xml 0bootstrap.xml.template version=${{steps.gitversion.outputs.legacySemVer}} | ||
#- name: 0test | ||
# run: ./0install.sh run https://apps.0install.net/0install/0test.xml 0bootstrap-${{steps.gitversion.outputs.legacySemVer}}.xml | ||
|
||
# Release | ||
- name: Create GitHub Release | ||
if: github.ref_type == 'tag' | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: | | ||
0bootstrap-${{steps.gitversion.outputs.legacySemVer}}.xml | ||
0bootstrap-${{steps.gitversion.outputs.legacySemVer}}.tar.bz2 | ||
- name: Publish feed | ||
if: github.ref_type == 'tag' | ||
env: | ||
GH_TOKEN: ${{secrets.PERSONAL_TOKEN}} | ||
run: > | ||
gh workflow run --repo=0install/apps Incoming | ||
-f feed_url=https://github.com/${{github.repository}}/releases/download/${{github.ref_name}}/0bootstrap-${{steps.gitversion.outputs.legacySemVer}}.xml | ||
-f archive_url=https://github.com/${{github.repository}}/releases/download/${{github.ref_name}}/0bootstrap-${{steps.gitversion.outputs.legacySemVer}}.tar.bz2 |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Caches | ||
__pycache__/ | ||
*.py[cod] | ||
.idea/ | ||
|
||
# Output | ||
/0bootstrap-*.xml | ||
/0bootstrap-*.tar.bz2 |
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?xml version="1.0" ?> | ||
<interface xmlns="http://zero-install.sourceforge.net/2004/injector/interface"> | ||
<name>0bootstrap</name> | ||
<summary>create a native package that installs 0install and a program</summary> | ||
<description> | ||
0bootstrap creates native binary packages (debs, RPMs, exes, etc) for use on systems | ||
where 0install is not already present. | ||
|
||
Unlike 0export, the packages do not contain the programs themselves. They are just | ||
launchers that trigger 0install to get the actual program. | ||
</description> | ||
|
||
<homepage>https://docs.0install.net/tools/0bootstrap/</homepage> | ||
|
||
<feed-for interface="http://0install.net/tools/0bootstrap-python.xml"/> | ||
|
||
<group> | ||
<command name="run" path="0bootstrap"> | ||
<runner interface="https://apps.0install.net/python/python.xml"> | ||
<version before="3"/> | ||
</runner> | ||
</command> | ||
<command name="test" path="tests/testbootstrap.py"> | ||
<runner interface="https://apps.0install.net/python/python.xml"> | ||
<version before="3"/> | ||
</runner> | ||
</command> | ||
<requires interface="https://apps.0install.net/0install/0install-python.xml"> | ||
<version not-before="1.0"/> | ||
<environment insert="" name="PYTHONPATH"/> | ||
</requires> | ||
|
||
<implementation version="{version}" local-path="."> | ||
<manifest-digest/> | ||
<archive href="0bootstrap-{version}.tar.bz2"/> | ||
</implementation> | ||
</group> | ||
</interface> |
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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
if [ "$#" -eq 0 ]; then | ||
echo "This script runs 0install from your PATH or downloads it on-demand." | ||
echo "" | ||
echo "To run 0install commands without adding 0install to your PATH:" | ||
echo "./0install.sh --help" | ||
echo "./0install.sh COMMAND [OPTIONS]" | ||
echo "" | ||
echo "To install to /usr/local:" | ||
echo "sudo ./0install.sh install local" | ||
echo "" | ||
echo "To install to your home directory:" | ||
echo "./0install.sh install home" | ||
exit 1 | ||
fi | ||
|
||
download() { | ||
zeroinstall_release=0install-$(uname | tr '[:upper:]' '[:lower:]')-$(uname -m)-${ZEROINSTALL_VERSION:-latest} | ||
download_dir=~/.cache/0install.net/$zeroinstall_release | ||
|
||
if [ ! -f $download_dir/files/0install ]; then | ||
echo "Downloading 0install..." >&2 | ||
rm -rf $download_dir | ||
mkdir -p $download_dir | ||
curl -sSL https://get.0install.net/$zeroinstall_release.tar.bz2 | tar xj --strip-components 1 --directory $download_dir | ||
fi | ||
} | ||
|
||
if [ "$1" = "install" ]; then | ||
download | ||
shift 1 | ||
$download_dir/install.sh "$@" | ||
else | ||
if command -v 0install > /dev/null 2> /dev/null; then | ||
0install "$@" | ||
else | ||
download | ||
$download_dir/files/0install "$@" | ||
fi | ||
fi |
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
mode: ContinuousDeployment | ||
|
||
# Generate 0install-compatible version numbers | ||
branches: | ||
# Mainline branches | ||
main: | ||
tag: rc-pre | ||
develop: | ||
tag: pre | ||
increment: patch | ||
|
||
# Stabilization branches | ||
release: | ||
tag: rc | ||
hotfix: | ||
tag: rc | ||
|
||
# Topic branches | ||
feature: | ||
tag: pre-pre | ||
pull-request: | ||
tag: pre-pre | ||
fallback: | ||
source-branches: [main] | ||
regex: ^(?!main|master|develop|release|hotfix|feature|pull|pr) | ||
tag: pre-pre |