-
Notifications
You must be signed in to change notification settings - Fork 0
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
deathaxe
committed
Dec 5, 2024
1 parent
0944c96
commit 1a975fa
Showing
5 changed files
with
107 additions
and
0 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
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,57 @@ | ||
@echo off | ||
setlocal | ||
chcp 65001 >nul | ||
pushd %~dp0 | ||
|
||
if /i "%1" == "release" goto RELEASE | ||
goto :usage | ||
|
||
:RELEASE | ||
if "%2"== "" goto :usage | ||
set version=%2 | ||
|
||
for %%d in ("%~dp0.") do set package=%%~nxd | ||
|
||
echo Creating assets for "%package%"... | ||
|
||
:: create tag and download asset for ST3 | ||
set build=3 | ||
set branch=st%build% | ||
set tag=st%build%-%version% | ||
set archive=%package%-%version%-st%build%.sublime-package | ||
set assets="%archive%#%archive%" | ||
call git tag -f %tag% %branch% | ||
call git archive --format zip -o "%archive%" %tag% | ||
|
||
:: create tag and download asset for ST4126+ (master branch) | ||
set build=4107 | ||
set branch=st%build% | ||
set tag=%build%-%version% | ||
set archive=%package%-%version%-st%build%.sublime-package | ||
set assets=%assets% "%archive%#%archive%" | ||
call git tag -f %tag% %branch% | ||
call git archive --format zip -o "%archive%" %tag% | ||
|
||
:: create tag and download asset for ST4126+ (master branch) | ||
set build=4126 | ||
set branch=master | ||
set tag=%build%-%version% | ||
set archive=%package%-%version%-st%build%.sublime-package | ||
set assets=%assets% "%archive%#%archive%" | ||
call git tag -f %tag% %branch% | ||
call git archive --format zip -o "%archive%" %tag% | ||
|
||
:: create github release (on master branch using latest tag) | ||
git push --tags --force | ||
gh release create --target %branch% -t "%package% %version%" "%tag%" %assets% | ||
del /f /q *.sublime-package | ||
git fetch | ||
goto :eof | ||
|
||
:USAGE | ||
echo USAGE: | ||
echo. | ||
echo make ^[release^] | ||
echo. | ||
echo release ^<semver^> -- create and publish a release (e.g. 1.2.3) | ||
goto :eof |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,28 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<xsl:stylesheet xmlns:xs="http://www.w3.org/2001/XMLSchema" | ||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||
exclude-result-prefixes="xs" | ||
version="2.0"> | ||
<xsl:output omit-xml-declaration="yes"/> | ||
|
||
<xsl:template match="/"> | ||
<xsl:text>INSERT ALL </xsl:text> | ||
|
||
<!-- Iterates all the rows from all the tables of the document --> | ||
<xsl:for-each select="//tr[@attr='foo']"> | ||
|
||
<!-- Skip the table header --> | ||
<xsl:if test="generate-id(.)!=generate-id(../tr[1])"> | ||
<xsl:text>INTO conversion VALUES(</xsl:text> | ||
<!-- Extracts the cells --> | ||
<xsl:for-each select="tc"> | ||
'<xsl:value-of select="replace(normalize-space(.), '^pe([a-z-[bcd]]{2,4})$', 'item $1')"/>' | ||
</xsl:for-each> | ||
<xsl:text>)</xsl:text> | ||
</xsl:if> | ||
</xsl:for-each> | ||
|
||
<xsl:text>SELECT * FROM dual</xsl:text> | ||
|
||
</xsl:template> | ||
</xsl:stylesheet> |