Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
f631ea2
ADDED: instructions for building and installing from terminal, aded m…
AleixMT Jan 2, 2025
a23586b
FIXED: typo in workflow
AleixMT Jan 2, 2025
ac79813
REMOVED: bump version
AleixMT Jan 2, 2025
cd11937
REMOVED: release bump
AleixMT Jan 2, 2025
7c3bc50
REMOVED: image path from gitignored folders
AleixMT Jan 2, 2025
8fe97a7
meaningless changes to trigger workflow
AleixMT Jan 2, 2025
303e38b
UPDATED: allow release updates
AleixMT Jan 2, 2025
ba9fd83
FIXED: typo for allowing updates
AleixMT Jan 2, 2025
a0e3772
UPDATED: split workflow in build and release
AleixMT Jan 2, 2025
1f3f33e
FIXED: split workflow in build and release
AleixMT Jan 2, 2025
99abb26
FIXED: delete typo of build block and changed variable to current_ver…
AleixMT Jan 2, 2025
1e1588f
CHANGED: variable name
AleixMT Jan 2, 2025
722adab
CHANGED: obtaining version in readme
AleixMT Jan 2, 2025
351a828
FIXED: changed order sections in readme
AleixMT Jan 2, 2025
e17b5c2
CHANGED: logo style in readme
AleixMT Jan 2, 2025
08dcb74
ADDED: shield for marketplace
AleixMT Jan 2, 2025
0b1f852
ADDED: detail in badge downloads
AleixMT Jan 2, 2025
6c2236f
FIXED: label in badge
AleixMT Jan 2, 2025
9c800d5
FIXED: label in badge
AleixMT Jan 2, 2025
ad7adba
FIXED: commands for installing from terminal
AleixMT Jan 2, 2025
99b23a5
UPDATED: version number
AleixMT Jan 2, 2025
40c4d39
CHANGED: env to output to communicate between jobs
AleixMT Jan 2, 2025
e7d0824
ADDED: outputs to retain data of the jobs
AleixMT Jan 2, 2025
049ab06
empty commit to trigger workflow
AleixMT Jan 2, 2025
dc3169a
CHANGED: name of variable
AleixMT Jan 2, 2025
336266a
FIXED: name of variable for checking out repo with privileges
AleixMT Jan 2, 2025
d4c5ccd
UPDATE: changed version
AleixMT Jan 2, 2025
f4db5c5
CHANGED: version back to v0.05
AleixMT Jan 2, 2025
5e70a07
CHANGED: version back to vv0.0.5
AleixMT Jan 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Build and Release VSCode Extension in GitHub

on:
push:
branches:
- main # Trigger on pushes to the main branch

jobs:
build:
name: Build
runs-on: ubuntu-latest
outputs:
current_version: ${{ steps.compute_version.outputs.current_version }}

steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
token: ${{ secrets.GH_TOKEN }}

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Install vsce
run: npm install -g @vscode/vsce

- name: Bump Version
id: compute_version
run: |
git config user.name "github-actions"
git config user.email "github-actions@github.com"1
CURRENT_VERSION=$(node -p "require('./package.json').version")
echo "Current version: $CURRENT_VERSION"
echo "current_version=$CURRENT_VERSION" >> $GITHUB_OUTPUT

- name: Build VSIX Package
run: vsce package --out arm-syntax-vscode-extension-${{ env.current_version }}.vsix

release:
name: Release
runs-on: ubuntu-latest
needs: build

steps:
- name: Create GitHub Release
uses: ncipollo/release-action@v1
with:
artifacts: arm-syntax-vscode-extension-${{ needs.build.outputs.current_version }}.vsix
tag: v${{ needs.build.outputs.current_version }}
name: "Release v${{ needs.build.outputs.current_version }}"
body: "Automated release of version v${{ needs.build.outputs.current_version }}"
allowUpdates: true
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}


4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
TODO.md
.vscode/
images/

*.vsix

3 changes: 3 additions & 0 deletions .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@
.vscode-test/**
.gitignore
vsc-extension-quickstart.md
makefile
.github/

64 changes: 61 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[![VSCode extensions marketplace][vscode-shield]][vscode-url]

# ARM Syntax README

## Author
Expand All @@ -10,7 +12,7 @@ Javier Mejias Reverté
## Features

Color Syntax Highlighting for ARM Assembly (keywords from **The ARM Instruction Set - ARM University Program - V1.0</**)
Instruction Set is adapted for **URV - ETSE - DEIM - Computadors**
Instruction Set is adapted for **URV - ETSE - DEIM - Fonaments de Computadors - Computadors - Estructura de Sistemes Operatius**

Color Syntax Highlighting is applied to the following file extensions:
- .s
Expand All @@ -24,18 +26,64 @@ Configurable color, bold, italic for each keyword type.

## Installing

### Requirements

None required.

### From VSCode

1. Open **Extensions** in VSCode
2. Click the **"..."** button at the top right of the Extensions window
3. Select **Install from VSIX**
4. Choose your **.vsix file**

### From shell

1. Open terminal with `Ctrl` + `Alt` + `T` or by opening the Terminal application.
2. Type the following commands:
```shell
LATEST_VERSION=$(curl -s https://api.github.com/repos/ininavicode/arm-syntax-vscode-extension/releases/latest | grep "tag_name" | cut -d '"' -f 4)
LATEST_VERSION=${VERSION:1}
wget -O arm-syntax-vscode-extension.vsix \
https://github.com/ininavicode/arm-syntax-vscode-extension/releases/download/v${LATEST_VERSION}/arm-syntax-vscode-extension-${LATEST_VERSION}.vsix # Download latest release
code --install-extension arm-syntax-vscode-extension.vsix # Install extension
```

---

## Requirements
## Building

None required.
### Requirements

* [![nodejs][nodejs-shield]][nodejs-url]
* [![vsce][vsce-shield]][vsce-url]

### Install build requirements

```shell
# Install node version manager
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash

# Set up nvm to use nodeJS 20.x.x
nvm install 20
nvm use 20

# Install vsce
npm install -g @vscode/vsce
```

### Build instructions

```shell
# Clone repo
git clone https://github.com/ininavicode/arm-syntax-vscode-extension

# Navigate inside the folder
cd arm-syntax-vscode-extension

# Build extension
vsce package --out arm-syntax-vscode-extension.vsix
```

---

Expand Down Expand Up @@ -76,3 +124,13 @@ Changed default colors

### V0.0.5
Fixed error detecting inmediate values.



[nodejs-shield]: https://img.shields.io/badge/nodeJS-20.x.x-orange?style=for-the-badge&logo=nodedotjs&logoColor=white
[nodejs-url]: https://nodejs.org/en
[vsce-shield]: https://img.shields.io/badge/vsce-3.2.1-white?style=for-the-badge&logo=vscodium&logoColor=black
[vsce-url]: https://github.com/microsoft/vscode-vsce
[vscode-shield]: https://img.shields.io/visual-studio-marketplace/i/ininavicode.arm-syntax?label=VSCode%20marketplace%20installations
[vscode-url]: https://marketplace.visualstudio.com/items?itemName=ininavicode.arm-syntax

Binary file added images/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 36 additions & 0 deletions makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Variables
EXTENSION_NAME := arm-syntax-vscode-extension
VSIX_FILE := $(EXTENSION_NAME).vsix

# Default target
.PHONY: all
all: $(VSIX_FILE)


# Build the VSCode extension (only if VSIX does not exist)
$(VSIX_FILE): package.json CHANGELOG.md extension.js language-configuration.json LICENSE README.md images/logo.png syntaxes/arm.tmLanguage.json
@echo "🔨 Building the VSCode extension..."
@npm install
@vsce package --out $(VSIX_FILE)
@echo "✅ Build complete: $(VSIX_FILE)"

## Install the VSCode extension
.PHONY: install
install: $(VSIX_FILE)
@echo "🚀 Installing the VSCode extension..."
@code --install-extension $(VSIX_FILE) --force
@echo "✅ Extension installed."

## Uninstall the VSCode extension
.PHONY: uninstall
uninstall: $(VSIX_FILE)
@echo "🗑️ Uninstalling the VSCode extension..."
@code --uninstall-extension $(VSIX_FILE)
@echo "✅ Extension uninstalled."

## Clean generated files
.PHONY: clean
clean:
@echo "🧹 Cleaning build artifacts..."
@rm -f $(VSIX_FILE)
@echo "✅ Clean complete."
15 changes: 15 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.