Skip to content

Commit

Permalink
removing debugging, and making name changes
Browse files Browse the repository at this point in the history
  • Loading branch information
TJ Lambert committed Sep 30, 2021
1 parent 8993b93 commit 23ff309
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 20 deletions.
27 changes: 14 additions & 13 deletions tools/apidiff/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -316,13 +316,15 @@ ifdef INCLUDE_MAC
endif

# Dotnet iOS vs. Dotnet MacCatalyst
ifdef INCLUDE_IOS
ifdef INCLUDE_MACCATALYST
$(Q) if ! grep "No change detected" $(APIDIFF_DIR)/dotnet/iOS-MacCatalyst/iOS-MacCatalyst-api-diff.html >/dev/null 2>&1; then \
echo "<h2><a href='dotnet/iOS-MacCatalyst/iOS-MacCatalyst-api-diff.html'>Xamarin.iOS-MacCatalyst Dotnet iOS vs Dotnet MacCatalyst API diff</a></h2>" >> $@; \
else \
echo "<h2>Xamarin.iOS-MacCatalyst Dotnet iOS vs Dotnet MacCatalyst API diff</h2>" >> $@; \
fi;
endif
endif

# easy-to-type helper targets.
# one rule to create all the api diffs
Expand Down Expand Up @@ -434,9 +436,9 @@ verify-reference-assemblies-ios: $(APIDIFF_DIR)/temp/native-32/Xamarin.iOS.xml $
@echo iOS reference assemblies are identical

clean-local::
rm -rf temp references diff *.exe* api-diff.html
rm -rf temp references diff dotnet legacy-diff iOS-MacCatalyst-diff *.exe* api-diff.html
rm -rf *.dll* bundle-*.zip $(UNZIP_STAMP)
rm -rf ios-*.md tvos-*.md watchos-*.md macos-*.md
rm -rf ios-*.md tvos-*.md watchos-*.md macos-*.md dotnet-*.md

DIRS += $(APIDIFF_DIR)/temp $(APIDIFF_DIR)/diff

Expand All @@ -455,9 +457,9 @@ ifdef INCLUDE_IOS
ios-markdown: merger.exe $(foreach file,$(IOS_ASSEMBLIES),$(APIDIFF_DIR)/diff/xi/$(file).md)
$(Q) $(SYSTEM_MONO) --debug merger.exe Xamarin.iOS $(CURDIR)/diff/xi/Xamarin.iOS/ ios
dotnet-ios-markdown: merger.exe $(APIDIFF_DIR)/diff/dotnet/iOS/Xamarin.iOS.md
$(Q) $(SYSTEM_MONO) --debug merger.exe Xamarin.iOS.Dotnet $(CURDIR)/diff/dotnet/iOS/ Dotnet-iOS stable-new
$(Q) $(SYSTEM_MONO) --debug merger.exe Xamarin.iOS.Dotnet $(CURDIR)/diff/dotnet/iOS/ dotnet-ios
dotnet-legacy-ios-markdown: merger.exe $(APIDIFF_DIR)/legacy-diff/iOS/Xamarin.iOS.md
$(Q) $(SYSTEM_MONO) --debug merger.exe Xamarin.iOS.Stable.Legacy $(CURDIR)/legacy-diff/iOS/ iOS stable-legacy
$(Q) $(SYSTEM_MONO) --debug merger.exe Xamarin.iOS.Stable.Legacy $(CURDIR)/legacy-diff/iOS/ dotnet-legacy-ios
else
ios-markdown: ; @true
dotnet-ios-markdown: ; @true
Expand All @@ -468,9 +470,9 @@ ifdef INCLUDE_TVOS
tvos-markdown: merger.exe $(foreach file,$(TVOS_ASSEMBLIES),$(APIDIFF_DIR)/diff/xi/$(file).md)
$(Q) $(SYSTEM_MONO) --debug merger.exe Xamarin.TVOS $(CURDIR)/diff/xi/Xamarin.TVOS/ tvos
dotnet-tv-markdown: merger.exe $(APIDIFF_DIR)/diff/dotnet/tvOS/Xamarin.TVOS.md
$(Q) $(SYSTEM_MONO) --debug merger.exe Xamarin.TVOS.Dotnet $(CURDIR)/diff/dotnet/tvOS/ Dotnet-tvOS stable-new
$(Q) $(SYSTEM_MONO) --debug merger.exe Xamarin.TVOS.Dotnet $(CURDIR)/diff/dotnet/tvOS/ dotnet-tvos
dotnet-legacy-tv-markdown: merger.exe $(APIDIFF_DIR)/legacy-diff/tvOS/Xamarin.TVOS.md
$(Q) $(SYSTEM_MONO) --debug merger.exe Xamarin.TVOS.Stable.Legacy $(CURDIR)/legacy-diff/tvOS/ tvOS stable-legacy
$(Q) $(SYSTEM_MONO) --debug merger.exe Xamarin.TVOS.Stable.Legacy $(CURDIR)/legacy-diff/tvOS/ dotnet-legacy-tvos
else
tvos-markdown: ; @true
dotnet-tv-markdown: ; @true
Expand All @@ -488,11 +490,11 @@ ifdef INCLUDE_MACCATALYST
maccat-markdown: merger.exe $(foreach file,$(MACCATALYST_ASSEMBLIES),$(APIDIFF_DIR)/diff/xi/$(file).md)
$(Q) $(SYSTEM_MONO) --debug merger.exe Xamarin.MacCatalyst $(CURDIR)/diff/xi/Xamarin.MacCatalyst/ maccat
dotnet-maccatalyst-markdown: merger.exe $(APIDIFF_DIR)/diff/dotnet/MacCatalyst/Xamarin.MacCatalyst.md
$(Q) $(SYSTEM_MONO) --debug merger.exe Xamarin.MacCatalyst.Dotnet $(CURDIR)/diff/dotnet/MacCatalyst/ Dotnet-MacCatalyst stable-new
$(Q) $(SYSTEM_MONO) --debug merger.exe Xamarin.MacCatalyst.Dotnet $(CURDIR)/diff/dotnet/MacCatalyst/ dotnet-maccatalyst
dotnet-legacy-maccatalyst-markdown: merger.exe $(APIDIFF_DIR)/legacy-diff/MacCatalyst/Xamarin.MacCatalyst.md
$(Q) $(SYSTEM_MONO) --debug merger.exe Xamarin.MacCatalyst.Stable.Legacy $(CURDIR)/legacy-diff/MacCatalyst/ MacCatalyst stable-legacy
$(Q) $(SYSTEM_MONO) --debug merger.exe Xamarin.MacCatalyst.Stable.Legacy $(CURDIR)/legacy-diff/MacCatalyst/ dotnet-legacy-maccatalyst
dotnet-iOS-MacCatalyst-markdown: merger.exe $(APIDIFF_DIR)/iOS-MacCatalyst-diff/Xamarin.iOS-MacCatalyst.md
$(Q) $(SYSTEM_MONO) --debug merger.exe Xamarin.Dotnet.iOS-MacCatalyst $(CURDIR)/iOS-MacCatalyst-diff/ iOS MacCatalyst
$(Q) $(SYSTEM_MONO) --debug merger.exe Xamarin.Dotnet.iOS-MacCatalyst $(CURDIR)/iOS-MacCatalyst-diff/ dotnet-ios-maccatalyst
else
maccat-markdown: ; @true
dotnet-maccatalyst-markdown: ; @true
Expand All @@ -504,9 +506,9 @@ ifdef INCLUDE_MAC
macos-markdown: merger.exe $(foreach file,$(MAC_ASSEMBLIES),$(APIDIFF_DIR)/diff/xm/$(file).md)
$(Q) $(SYSTEM_MONO) --debug merger.exe Xamarin.Mac $(CURDIR)/diff/xm/Xamarin.Mac/ macos
dotnet-macos-markdown: merger.exe $(APIDIFF_DIR)/diff/dotnet/macOS/Xamarin.Mac.md
$(Q) $(SYSTEM_MONO) --debug merger.exe Xamarin.Mac.Dotnet $(CURDIR)/diff/dotnet/macOS/ Dotnet-macOS stable-new
$(Q) $(SYSTEM_MONO) --debug merger.exe Xamarin.Mac.Dotnet $(CURDIR)/diff/dotnet/macOS/ dotnet-macos
dotnet-legacy-macos-markdown: merger.exe $(APIDIFF_DIR)/legacy-diff/macOS/Xamarin.Mac.md
$(Q) $(SYSTEM_MONO) --debug merger.exe Xamarin.Mac.Stable.Legacy $(CURDIR)/legacy-diff/macOS/ Mac stable-legacy
$(Q) $(SYSTEM_MONO) --debug merger.exe Xamarin.Mac.Stable.Legacy $(CURDIR)/legacy-diff/macOS/ dotnet-legacy-macos
else
macos-markdown: ; @true
dotnet-macos-markdown: ; @true
Expand Down Expand Up @@ -591,5 +593,4 @@ jenkins-api-diff:
$(Q) $(CP) *.html $(JENKINS_RESULTS_DIRECTORY)/api-diff
$(Q) $(CP) *.md $(JENKINS_RESULTS_DIRECTORY)/api-diff
$(Q) $(CP) -R diff $(JENKINS_RESULTS_DIRECTORY)/api-diff
$(Q) $(CP) -R legacy-diff $(JENKINS_RESULTS_DIRECTORY)/api-diff
$(Q) $(CP) -R iOS-MacCatalyst-diff $(JENKINS_RESULTS_DIRECTORY)/api-diff
$(Q) $(CP) -R dotnet $(JENKINS_RESULTS_DIRECTORY)/api-diff
10 changes: 3 additions & 7 deletions tools/apidiff/merger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ static string GetVersion (string line)
return line.Substring (start, end - start);
}

public static void Process (string platform, string path, string os, string filenameOverride = null)
public static void Process (string platform, string path, string os)
{
if (!Directory.Exists (path))
throw new DirectoryNotFoundException (path);
Expand Down Expand Up @@ -52,8 +52,7 @@ public static void Process (string platform, string path, string os, string file
}

// https://github.com/MicrosoftDocs/xamarin-docs/blob/live/contributing-guidelines/template.md#file-name
var filenameContent = filenameOverride is null ? $"{os}-{from}-{to}" : $"{os}-{filenameOverride}";
var filename = filenameContent.Replace ('.', '-').ToLowerInvariant () + ".md";
var filename = $"{os}-{from}-{to}".Replace ('.', '-').ToLowerInvariant () + ".md";
byte[] digest = null;
using (var md = SHA256.Create ())
digest = md.ComputeHash (Encoding.UTF8.GetBytes (filename));
Expand Down Expand Up @@ -92,10 +91,7 @@ public static void Process (string platform, string path, string os, string file
public static int Main (string [] args)
{
try {
if (args.Length == 4)
Process (args [0], args [1], args [2], args[3]);
else
Process (args [0], args [1], args [2]);
Process (args [0], args [1], args [2]);
return 0;
} catch (Exception e) {
Console.WriteLine (e);
Expand Down
1 change: 1 addition & 0 deletions tools/devops/automation/scripts/bash/compare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#
# c. Execute 'PR_ID=4614 ./compare.sh'
#

API_COMPARISON="$WORKSPACE/apicomparison"
BUILD_URL="$SYSTEM_TEAMFOUNDATIONCOLLECTIONURI$SYSTEM_TEAMPROJECT/_build/index?buildId=$BUILD_BUILDID&view=ms.vss-test-web.test-result-details"
URL_PREFIX="$VSDROPSPREFIX/$BUILD_BUILDNUMBER/$BUILD_BUILDID/apigeneratordiff/;/"
Expand Down

0 comments on commit 23ff309

Please sign in to comment.