Skip to content

Commit 3b2b9e7

Browse files
committed
antigravity: copy workflow from arrans_overlay
1 parent 97ac1a7 commit 3b2b9e7

16 files changed

Lines changed: 230 additions & 32 deletions

File tree

Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
name: Check and Update Antigravity Bin
2+
3+
permissions:
4+
contents: write
5+
pull-requests: write
6+
7+
on:
8+
schedule:
9+
- cron: '0 0 * * *'
10+
workflow_dispatch:
11+
push:
12+
paths:
13+
- '.github/workflows/dev-util-antigravity-bin-update.yaml'
14+
15+
env:
16+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
17+
ecn: dev-util
18+
epn: antigravity-bin
19+
description: "Google Antigravity AI-driven IDE (binary release)"
20+
homepage: "https://antigravity.google/"
21+
workflow_filename: dev-util-antigravity-bin-update.yaml
22+
23+
jobs:
24+
check-and-create-ebuild:
25+
runs-on: ubuntu-latest
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/checkout@v4
29+
30+
- name: Install g2
31+
uses: arran4/g2-action@v1.2
32+
33+
- name: Set up Git
34+
run: |
35+
git config --global user.name 'github-actions[bot]'
36+
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
37+
38+
- name: Install required tools
39+
run: |
40+
sudo apt-get update
41+
sudo apt-get install -y wget jq coreutils curl
42+
- name: Process release
43+
id: process_releases
44+
run: |
45+
ebuild_dir="./${{ env.ecn }}/${{ env.epn }}"
46+
mkdir -p "$ebuild_dir"
47+
metadata_file="${ebuild_dir}/metadata.xml"
48+
if [ ! -f "$metadata_file" ]; then
49+
if [ ! -f "$metadata_file" ]; then
50+
{
51+
echo '<?xml version="1.0" encoding="UTF-8"?>'
52+
echo '<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">'
53+
echo '<pkgmetadata>'
54+
echo ' <maintainer type="person">'
55+
echo ' <email>gentoo@arran4.com</email>'
56+
echo ' <name>Arran Ubels</name>'
57+
echo ' </maintainer>'
58+
echo '</pkgmetadata>'
59+
} > "$metadata_file"
60+
fi
61+
fi
62+
63+
curl -sL --compressed -A "Mozilla/5.0" https://antigravity.google/download > /tmp/index.html
64+
main_js=$(grep -o 'main-[^"]*\.js' /tmp/index.html | head -n 1 | tr -d '\r')
65+
echo "main_js: $main_js"
66+
if [ -z "$main_js" ]; then
67+
echo "Could not find main_js. First 500 bytes of index.html:"
68+
head -c 500 /tmp/index.html
69+
exit 1
70+
fi
71+
72+
curl -sL --compressed -A "Mozilla/5.0" "https://antigravity.google/$main_js" > /tmp/main.js
73+
download_url=$(grep -io 'https://[a-zA-Z0-9./_-]*antigravity\.tar\.gz' /tmp/main.js | head -n 1 | tr -d '\r')
74+
echo "download_url: $download_url"
75+
if [ -z "$download_url" ]; then
76+
echo "Could not find download_url. First 500 bytes of main.js:"
77+
head -c 500 /tmp/main.js
78+
exit 1
79+
fi
80+
81+
version=$(echo "$download_url" | grep -oE '[0-9]+\.[0-9]+\.[0-9]+-[0-9]+' | head -n 1)
82+
echo "version: $version"
83+
if [ -z "$version" ]; then
84+
echo "Could not find version"
85+
exit 1
86+
fi
87+
88+
gentoo_version=$(echo "$version" | sed 's/-/_p/g')
89+
90+
ebuild_file="${ebuild_dir}/${{ env.epn }}-${gentoo_version}.ebuild"
91+
needs_update=false
92+
93+
if [ ! -f "$ebuild_file" ]; then
94+
needs_update=true
95+
fi
96+
97+
if [ "$needs_update" = true ]; then
98+
# shellcheck disable=SC2016
99+
{
100+
echo '# Generated via: https://github.com/arran4/arrans_overlay/blob/main/.github/workflows/${{ env.workflow_filename }}'
101+
echo 'EAPI=8'
102+
echo 'inherit desktop'
103+
echo "DESCRIPTION=\"${{ env.description }}\""
104+
echo "HOMEPAGE=\"${{ env.homepage }}\""
105+
echo 'LICENSE="Antigravity"'
106+
echo 'SLOT="0"'
107+
echo 'KEYWORDS="~amd64"'
108+
echo 'IUSE=""'
109+
echo 'DEPEND=""'
110+
echo 'RDEPEND="sys-libs/glibc"'
111+
echo 'RESTRICT="strip"'
112+
echo 'QA_PREBUILT="opt/antigravity/antigravity opt/antigravity/chrome-sandbox opt/antigravity/chrome_crashpad_handler"'
113+
echo ''
114+
echo 'SRC_URI="amd64? ( '"${download_url}"' -> ${P}.tar.gz )"'
115+
echo ''
116+
echo 'S="${WORKDIR}/Antigravity"'
117+
echo ''
118+
echo 'src_install() {'
119+
echo ' insinto /opt/antigravity'
120+
echo ' doins -r *'
121+
echo ' fperms +x /opt/antigravity/antigravity'
122+
echo ' fperms 4755 /opt/antigravity/chrome-sandbox'
123+
echo ' fperms +x /opt/antigravity/chrome_crashpad_handler'
124+
echo ' dosym ../antigravity/antigravity /opt/bin/antigravity'
125+
echo ' newicon "resources/app/resources/linux/code.png" antigravity.png'
126+
echo ' domenu "${FILESDIR}/antigravity-bin.desktop"'
127+
echo '}'
128+
} > "$ebuild_file"
129+
130+
g2 manifest upsert-from-url "$download_url" "${{ env.epn }}-${gentoo_version}.tar.gz" "${ebuild_dir}/Manifest"
131+
rm -f "${{ env.epn }}-${gentoo_version}.tar.gz"
132+
echo "generated_version=${gentoo_version}" >> $GITHUB_OUTPUT
133+
fi
134+
135+
- name: Create Pull Request
136+
if: steps.process_releases.outputs.generated_version
137+
uses: peter-evans/create-pull-request@v6
138+
with:
139+
token: ${{ secrets.GITHUB_TOKEN }}
140+
commit-message: "Add ebuilds for new ${{ env.epn }} release ${{ steps.process_releases.outputs.generated_version }}"
141+
title: "Update ${{ env.epn }} to ${{ steps.process_releases.outputs.generated_version }}"
142+
body: "Automated update for ${{ env.epn }} to version ${{ steps.process_releases.outputs.generated_version }}."
143+
branch: "update-${{ env.epn }}-${{ steps.process_releases.outputs.generated_version }}-1"
144+
base: main
145+
signoff: false
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
DIST antigravity-bin-1.16.5-amd64.deb 159265264 BLAKE2B 102e18115e7174baf9734ab145acadcade9d9157313e129d2a19da95bf4745121b4abf98fe14e2036faae49be67fb96577e694e8d718abaa562aa7b79c6eaddb SHA512 9926caa520f89da9e92cb94d7304f88055f142d1e44b17a5ba7097bd3bd512c1a80c20519d4dd93862c7ae138eaaa0437e7c17f0bd6307c6ed78c06ea7a69252
2+
DIST antigravity-bin-1.16.5-arm64.deb 150247232 BLAKE2B 95c3590d029a986e4118e3dae88a3112dd5b1eddc75e46072d44eb9309203d6b795e3ac769bcda4c3c9aa7bb2a67754dbf69ce95ac9d7eca31a89b824bbbe7b5 SHA512 300158b8aeeac89c9e250ec88c7457bdab9d3ef42c251b424a5b10d5a63b0ea9fd0c064ecf2394d7f483c14aaba046f0c4132c7c453db75f1e8688c628497816
3+
DIST antigravity-bin-2.0.6_p5413878570549248.tar.gz 176423087 BLAKE2B aeeb779766a6dfcfa4d69419ed5834139e88dc352329dba0e8d63adc7b09bf942df996eda2c01ffa80091a8eab0ec65fe04efc46a44ca50b4c9ed151e7f83e48 SHA512 ed9880d86a8eb53c11af8d520e707d29382aa571f150e23be989d4a28d367de5d52304f8ce6e766e707f2eea1cd278f38ea5d57a8385d25f3a2a3324128f6d81

app-editors/antigravity/antigravity-1.16.5-r1.ebuild renamed to app-editors/antigravity-bin/antigravity-bin-1.16.5-r1.ebuild

File renamed without changes.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Generated via: https://github.com/arran4/arrans_overlay/blob/main/.github/workflows/dev-util-antigravity-bin-update.yaml
2+
EAPI=8
3+
inherit desktop
4+
DESCRIPTION="Google Antigravity AI-driven IDE (binary release)"
5+
HOMEPAGE="https://antigravity.google/"
6+
LICENSE="Antigravity"
7+
SLOT="0"
8+
KEYWORDS="~amd64"
9+
IUSE=""
10+
DEPEND=""
11+
RDEPEND="sys-libs/glibc"
12+
RESTRICT="strip"
13+
QA_PREBUILT="opt/antigravity/antigravity opt/antigravity/chrome-sandbox opt/antigravity/chrome_crashpad_handler"
14+
15+
SRC_URI="amd64? ( https://storage.googleapis.com/antigravity-public/antigravity-hub/2.0.6-5413878570549248/linux-x64/Antigravity.tar.gz -> ${P}.tar.gz )"
16+
17+
S="${WORKDIR}/Antigravity"
18+
19+
src_install() {
20+
insinto /opt/antigravity
21+
doins -r *
22+
fperms +x /opt/antigravity/antigravity
23+
fperms 4755 /opt/antigravity/chrome-sandbox
24+
fperms +x /opt/antigravity/chrome_crashpad_handler
25+
dosym ../antigravity/antigravity /opt/bin/antigravity
26+
newicon "resources/app/resources/linux/code.png" antigravity.png
27+
domenu "${FILESDIR}/antigravity-bin.desktop"
28+
}

‎app-editors/antigravity/Manifest‎

Lines changed: 0 additions & 2 deletions
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
DIST bluegriffon-3.1.Ubuntu18.04-x86_64.tar.bz2 281359437 BLAKE2B dddcf0dc38a9d7f6ad81047598ac62f5698e1771019e34aaaca29361f15a9cb603686e1c9f68848afda4c64dce2b5e36dd07c7e734b0cc2e0828bcf8be47cd89 SHA512 f069f0313523c7a32f286e3629f149728c565717252f17ce5f31eee2f58de53413edce8c60cc302704b4013913f7da995ce746fa25c1b13eea0551ecc946d28b

dev-util/bluegriffon-bin/bluegriffon-bin-1.8.ebuild renamed to app-editors/bluegriffon-bin/bluegriffon-bin-3.1.ebuild

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ MY_PN="bluegriffon"
88
DESCRIPTION="The next-generation Web Editor based on the rendering engine of Firefox"
99
HOMEPAGE="http://www.bluegriffon.org/"
1010
SRC_URI="
11-
amd64? ( http://bluegriffon.org/freshmeat/${PV}/${MY_PN}-${PV}.Ubuntu15.04.x86_64.tar.bz2 )
11+
amd64? ( http://bluegriffon.org/freshmeat/${PV}/${MY_PN}-${PV}.Ubuntu18.04-x86_64.tar.bz2 )
1212
"
1313
#http://bluegriffon.org/freshmeat/1.8/bluegriffon-1.8.Ubuntu15.04.x86_64.tar.bz2
1414

dev-util/google-webdesigner/google-webdesigner-12.2.0.0.ebuild renamed to app-editors/google-webdesigner/google-webdesigner-12.2.0.0.ebuild

File renamed without changes.

0 commit comments

Comments
 (0)