-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update .gitignore and add release script
- Loading branch information
deathaxe
committed
Dec 18, 2024
1 parent
6ff02bd
commit 62d057f
Showing
2 changed files
with
51 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,12 @@ | ||
*.cmd | ||
# MacOS specific ignores | ||
.DS_Store | ||
|
||
# development | ||
.sublime/ | ||
.venv/ | ||
.vscode/ | ||
|
||
# python cache files | ||
__pycache__/ | ||
*.pyc | ||
|
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,39 @@ | ||
@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 downloadable asset for ST4126+ | ||
set branch=master | ||
set tag=4152-%version% | ||
set archive=%package%.sublime-package | ||
set assets="%archive%#%archive%" | ||
call git push origin %branch% | ||
call git archive --format zip -o "%archive%" %branch% | ||
|
||
:: create the release | ||
gh release create --target %branch% -t "Release %version%" "%tag%" %assets% | ||
del /f /q *.sublime-package | ||
git fetch | ||
goto :eof | ||
|
||
:USAGE | ||
echo USAGE: | ||
echo. | ||
echo all ^[release^] | ||
echo prefs ^[release^] | ||
echo make ^[release^] | ||
echo. | ||
echo release ^<semver^> -- create and publish a release (e.g. 1.2.3) | ||
goto :eof |