forked from nikita/muzika-gromche
Implement zip bundle as an after-build msbuild target, keep versions in sync
This commit is contained in:
parent
af45b958fd
commit
066304a9fe
|
@ -485,6 +485,7 @@ $RECYCLE.BIN/
|
|||
|
||||
# Override *.user rule for templates
|
||||
!*.template.props.user
|
||||
!*.template.just.user
|
||||
|
||||
riderModule.iml
|
||||
dist/
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
import? 'MuzikaGromche.just.user'
|
||||
|
||||
build: build-debug build-release
|
||||
|
||||
build-release:
|
||||
dotnet build --configuration Release
|
||||
|
||||
build-debug:
|
||||
dotnet build --configuration Debug
|
||||
|
||||
clean:
|
||||
rm -rf dist MuzikaGromche/bin MuzikaGromche/obj
|
||||
|
||||
plugin_dir := "$HOME/.config/r2modmanPlus-local/LethalCompany/profiles" / imperium_profile / "BepInEx/plugins/Oflor-MuzikaGromche/"
|
||||
|
||||
install-imperium:
|
||||
rm -rf "{{ plugin_dir }}"
|
||||
mkdir "{{ plugin_dir }}"
|
||||
unzip -q dist/MuzikaGromche-Debug.zip -d "{{ plugin_dir }}"
|
||||
|
||||
run-imperium:
|
||||
DRI_PRIME=1 steam -applaunch 1966720 --doorstop-enable true --doorstop-target "Z:$HOME/.config/r2modmanPlus-local/LethalCompany/profiles/{{ imperium_profile }}/BepInEx/core/BepInEx.Preloader.dll" --r2profile "{{ imperium_profile }}"
|
||||
|
||||
bump version_number:
|
||||
[[ "v{{ version_number }}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]] || (echo "Invalid version format" && exit 1)
|
||||
jq --indent 4 --arg v "{{ version_number }}" '.version_number = $v' < manifest.json > manifest.json.copy
|
||||
mv manifest.json.copy manifest.json
|
||||
sed -i 's/<Version>.*<\/Version>/<Version>{{ version_number }}<\/Version>/' MuzikaGromche/MuzikaGromche.csproj
|
|
@ -0,0 +1,3 @@
|
|||
# Copy me to MuzikaGromche.just.user and adjust tasks to your workflow
|
||||
|
||||
imperium_profile := "Muzika Gromche with Imperium"
|
|
@ -4,7 +4,7 @@
|
|||
<TargetFramework>netstandard2.1</TargetFramework>
|
||||
<AssemblyName>MuzikaGromche</AssemblyName>
|
||||
<Description>Opa che tut u nas</Description>
|
||||
<Version>1.0.0</Version>
|
||||
<Version>13.37.6</Version>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<LangVersion>latest</LangVersion>
|
||||
</PropertyGroup>
|
||||
|
@ -32,4 +32,39 @@
|
|||
<ItemGroup Condition="'$(TargetFramework.TrimEnd(`0123456789`))' == 'net'">
|
||||
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.2" PrivateAssets="all"/>
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="Bundle" AfterTargets="Build">
|
||||
<PropertyGroup>
|
||||
<DistDir>$(TargetDir)MuzikaGromche\</DistDir>
|
||||
<ZipBundle>$(TargetDir)MuzikaGromche-$(Configuration).zip</ZipBundle>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackagedResources Include="$(SolutionDir)README.md" />
|
||||
<PackagedResources Include="$(SolutionDir)icon.png" />
|
||||
<PackagedResources Include="$(SolutionDir)manifest.json" />
|
||||
<PackagedResources Include="$(TargetDir)MuzikaGromche.dll" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<AudioFiles Include="$(SolutionDir)Assets\*.mp3" />
|
||||
<AudioFiles Include="$(SolutionDir)Assets\*.ogg" />
|
||||
<AudioFiles Include="$(SolutionDir)Assets\*.wav" />
|
||||
</ItemGroup>
|
||||
|
||||
<RemoveDir Directories="$(DistDir)" />
|
||||
<Copy
|
||||
SourceFiles="@(AudioFiles);@(PackagedResources)"
|
||||
DestinationFolder="$(DistDir)"
|
||||
/>
|
||||
<ZipDirectory
|
||||
SourceDirectory="$(DistDir)"
|
||||
DestinationFile="$(TargetDir)MuzikaGromche-$(Configuration).zip"
|
||||
Overwrite="true"
|
||||
/>
|
||||
<Copy
|
||||
SourceFiles="$(ZipBundle)"
|
||||
DestinationFolder="$(SolutionDir)dist\"
|
||||
/>
|
||||
</Target>
|
||||
</Project>
|
||||
|
|
Loading…
Reference in New Issue