-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathJustfile
68 lines (59 loc) · 2.49 KB
/
Justfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
NAME := "tibr-ext"
DOMAIN := "andypiper.org"
EXTENSION_ID := NAME + "@" + DOMAIN
# List available commands
default:
@just --list
# Pack the extension using GNOME's tools and include extra sources
pack:
@echo "Packaging extension to {{ EXTENSION_ID }}.shell-extension.zip"
gnome-extensions pack --force \
--extra-source=api.js \
--extra-source=images \
--extra-source=radio.js \
--extra-source=constants.js \
{{ EXTENSION_ID }}
zip -u {{ EXTENSION_ID }}.shell-extension.zip LICENSE README.md CHANGELOG.md
@echo "Extension packaged successfully"
# Install the extension to the user's home directory
install:
@echo "Installing extension to ~/.local/share/gnome-shell/extensions/{{ EXTENSION_ID }}"
@mkdir -p ~/.local/share/gnome-shell/extensions/{{ EXTENSION_ID }}
@rm -rf ~/.local/share/gnome-shell/extensions/{{ EXTENSION_ID }}/*
# Copy extension files from the [email protected] directory
@cp -r {{ EXTENSION_ID }}/* ~/.local/share/gnome-shell/extensions/{{ EXTENSION_ID }}/
@echo "Extension installed successfully"
# Start a nested GNOME Shell instance for testing
test:
MUTTER_DEBUG_DUMMY_MODE_SPECS="[email protected]" dbus-run-session -- gnome-shell --nested --wayland
# Install and then immediately test the extension
install-and-test: install
@echo "Extension installed. Starting test environment..."
@just test
# Create a GitHub release
release VERSION message="New release": pack
@echo "Creating GitHub release v{{ VERSION }}..."
gh release create v{{ VERSION }} \
--title "v{{ VERSION }}" \
--notes "{{ message }}" \
{{ EXTENSION_ID }}.shell-extension.zip
@echo "GitHub release created successfully"
# Update the version in metadata.json
update-version VERSION:
@echo "Updating version to {{ VERSION }} in metadata.json"
@sed -i 's/"version-name": "[^"]*"/"version-name": "{{ VERSION }}"/' {{ EXTENSION_ID }}/metadata.json
@echo "Version updated successfully"
# Create a new release with version update
full-release VERSION message="New release":
@just update-version {{ VERSION }}
@just pack
@echo "Creating GitHub release v{{ VERSION }}..."
gh release create v{{ VERSION }} \
--title "v{{ VERSION }}" \
--notes "{{ message }}" \
{{ EXTENSION_ID }}.shell-extension.zip
@echo "Full release process completed successfully"
# Remove build artifacts
clean:
@rm -rf {{ EXTENSION_ID }}.shell-extension.zip
@echo "Build artifacts cleaned"