forked from rokucommunity/brighterscript-formatter
-
Notifications
You must be signed in to change notification settings - Fork 0
[XELP] use forked versions for custom support and all the fixes. #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
a0ae642
[XELP] use forked versions for custom support (ReplacementIdentifier …
ljunkie e9e238e
Ignore any ReplacementIdentifiers (TokenKind.ReplacementIdentifier)
ljunkie 28c7dab
Add @stop (TokenKind.AtStop) support
ljunkie 6d480fe
Add insertSpaceBetweenFunctionAssignments to add/remove spaces betwee…
ljunkie b0c1345
Fix adding/removing spaces before negative numbers with chaining.
ljunkie e0b3ed4
Fix adding/removing spacing when right bracket is on a single line.
ljunkie 4236ad3
Fix negative ReplacementIdentifier (same as looksLikeNegativeVariable)
ljunkie a475a31
Fix keeping array brackets inline with return statement
ljunkie df6f275
Fix handling negative numbers at start of line
ljunkie 4703411
Fix indentation for arrays in `else if` and object literals
ljunkie bc0faa1
Fix handling indentation for suppressed indentors and `})]` sequences
ljunkie 174ef08
Fix preceeded typos
ljunkie 87a2169
Fix double indentation with same-line indent/outdent
ljunkie e8c38e7
[TESTS] cleanup some tests and add missing coverage.
ljunkie bf9848f
Added Next, EndInterface, EndEnum to tokens that can be followed by a…
ljunkie 00773db
[XELP] GHA shadow release
ljunkie 680026c
[GHA] disable some upstream workflows.
ljunkie 7ea5f8b
[GHA] bump node version
ljunkie File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains hidden or 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,105 @@ | ||
| name: Xelp Shadow Release | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| shadow-release: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
| steps: | ||
| - name: Checkout xelp/main | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| ref: xelp/main | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '18' | ||
|
|
||
| - name: Configure Git | ||
| run: | | ||
| git config user.name "github-actions[bot]" | ||
| git config user.email "github-actions[bot]@users.noreply.github.com" | ||
| - name: Calculate XelpShadow Version | ||
| id: version | ||
| run: | | ||
| CURRENT_VERSION=$(node -p "require('./package.json').version") | ||
| PACKAGE_NAME=$(node -p "require('./package.json').name") | ||
| echo "Current version: $CURRENT_VERSION" | ||
| echo "Package name: $PACKAGE_NAME" | ||
| echo "package_name=$PACKAGE_NAME" >> $GITHUB_OUTPUT | ||
| # Remove pre-release and build metadata | ||
| BASE_VERSION=$(echo "$CURRENT_VERSION" | sed 's/[-+].*//') | ||
| # Split version into parts | ||
| IFS='.' read -r -a PARTS <<< "$BASE_VERSION" | ||
| if [ ${#PARTS[@]} -ne 3 ]; then | ||
| echo "Error: Version must be in MAJOR.MINOR.PATCH format" | ||
| exit 1 | ||
| fi | ||
| MAJOR="${PARTS[0]}" | ||
| MINOR="${PARTS[1]}" | ||
| PATCH="${PARTS[2]}" | ||
| # Get build metadata | ||
| DATE=$(date +'%Y%m%d') | ||
| SHORT_HASH=$(git rev-parse --short HEAD) | ||
| # Construct base version: MAJOR.MINOR.DATE<PATCH> | ||
| CLEAN_VERSION="$MAJOR.$MINOR.$DATE$PATCH" | ||
| # Full version with metadata for the tag message/release notes | ||
| METADATA_VERSION="$CLEAN_VERSION+xelp-$SHORT_HASH" | ||
ljunkie marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| # Use clean version for package.json and git tag (no + or -) | ||
ljunkie marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| PACKAGE_VERSION="$CLEAN_VERSION" | ||
| TAG_VERSION="$CLEAN_VERSION" | ||
| echo "Clean version: $CLEAN_VERSION" | ||
| echo "Metadata version: $METADATA_VERSION" | ||
| echo "package_version=$PACKAGE_VERSION" >> $GITHUB_OUTPUT | ||
| echo "tag_version=$TAG_VERSION" >> $GITHUB_OUTPUT | ||
| echo "metadata_version=$METADATA_VERSION" >> $GITHUB_OUTPUT | ||
| - name: Install dependencies | ||
| run: npm ci | ||
|
|
||
| - name: Update package.json version | ||
| run: | | ||
| npm version ${{ steps.version.outputs.package_version }} --no-git-tag-version | ||
| - name: Build | ||
| run: npm run build | ||
|
|
||
| - name: Commit and Push | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: | | ||
| set -e | ||
| git checkout -b xelp/dist | ||
| git add -f dist/ package.json package-lock.json | ||
| git commit -m "Release shadow version ${{ steps.version.outputs.package_version }}" | ||
| git tag -a "${{ steps.version.outputs.tag_version }}" -m "Shadow release ${{ steps.version.outputs.metadata_version }}" | ||
| git push origin xelp/dist --force | ||
| git push origin "${{ steps.version.outputs.tag_version }}" --force | ||
ljunkie marked this conversation as resolved.
Show resolved
Hide resolved
|
||
ljunkie marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - name: Create Release | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GH_PAT }} | ||
ljunkie marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| run: | | ||
| gh release create "${{ steps.version.outputs.tag_version }}" \ | ||
| --repo ${{ github.repository }} \ | ||
| --title "Shadow Release ${{ steps.version.outputs.tag_version }}" \ | ||
| --notes "Shadow release build ${{ steps.version.outputs.metadata_version }} | ||
| ## package.json | ||
| \`\`\`json | ||
| \"${{ steps.version.outputs.package_name }}\": \"https://github.com/${{ github.repository }}.git#${{ steps.version.outputs.tag_version }}\" | ||
| \`\`\`" \ | ||
| --prerelease | ||
This file contains hidden or 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 hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.